Giter Club home page Giter Club logo

declare's Introduction

Declare

An app to automatically send the GA declaration form every week at a specified time, for the subscribed users.

⭐️ NEW! Features (V1.1) 11 March, 2021

  • Allow user to configure the day they want their all-clear forms sent.

Features (V1.0)

  • Students and GA team can send all-clear declaration forms every week.

Features in Consideration

  • Allow users to customise form fields (so these will be forms that are not all-clear)
  • Notify user via email for every declaration submitted? (Users should be able to turn on/off the feature. Or they can enable emails only when the service fails.)

For Developers:

Notable Technologies: Backend

  • Express
  • Heroku with Scheduler Add-on (runs api/jobs/sendGoogleForm.js every day. Due to Heroku scheduler restrictions which won't let me run jobs for a particular day of a week, this job runs everyday, but the script checks for the current date to see if it should run the job.)

Notable Technologies: Frontend

  • React
  • Material UI

Setup Instructions

This repository has two separate apps - a React client and an Express api.

STEP 1: Set the Environment Variables

Create a .env in /api following .env.example. Be sure to remove all comments.

FOR API

  • DB_USER: Your Mongo Atlas username (you don't need this if using your localhost MongoDB)

  • DB_PASS: Your Mongo Atlas password (you don't need this if using your localhost MongoDB)

  • DB_HOST= Your Mongo Atlas host. (you don't need this if using your localhost MongoDB)

  • DB_NAME: Name of your database

  • DB_TYPE: If this is not set to a string "atlas", it will default to using your localhost DB.

  • SCHEDULED_DAY This will affect the declaration day showed on the client. Should be a number from 0 - 6. (0 being Sunday, 6 being Saturday.)

  • SCHEDULED_TIME_IN_HOURS: This will affect the declaration time showed on the client. Should be a number from 0 - 23

  • NODE_ENV this should be either "production" or "development"

FOR CLIENT

Create a .env in /client following .env.example.

  • REACT_APP_API_URL: The API endpoint the client will interact with. The default should be
REACT_APP_API_URL=http://localhost:4000

STEP 3: Start the apps

For api you can use yarn dev if you have nodemon installed, if not yarn start

For client, just yarn start

Known Issues

❗️ Sometimes, user's last declared field does not update although forms were sent – my theory is that it's an async problem where the connection to the database closed before Mongoose completed saving the changes to the user model. Tried to resolve it with async/await.

❗️ Requests for the team form has stopped working. Unable to figure out the issue.

declare's People

Contributors

chelsejw avatar kevinngth avatar

Watchers

James Cloos avatar

Forkers

kevinngth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.