FinTech backed written in NodeJS, MongoDB, Express. Stores the clients Redux stores in Mongo and handles login, signup, payments. Routing on frontend
- Signup or login to Stripe (stripe.com) and verify your email address
- Get your test API keys ( or live keys by activating your account)
- Note the keys, pk_ for STRIPE_PUBLISHABLE_KEY and sk_ for STRIPE_SECRET_KEY for config.env
- Click products on the left side and add two products
- In each products page (by clicking on them) copy the API ID which looks like price_ and note for BASIC and PREMIUM where basic is a 7 day trial and cheaper subscription and PREMIUM is for advisor clients
- Your STRIPE_WEBHOOK_SECRET (whsec_) can be obtained by either for test (in CLI) running ‘stripe listen’ or in the developer section of the Stripe dashboard, clicking Webhooks and creating a webhook endpoint ({your_host}/api/purchases/webhook)
- Note your Mongo Connection string from your provider and the username and password. DATABASE is the connect string with username:
- DATABASE_PASSWORD is your password for that database user
- EMAIL_ variables are for development mailtrap credentials
- SENDGRID_ is the variables where you input your production sendgrid values given by sendgrid when you create your access
- Install a NodeJS version >10, testing at 12.16.3 as of writing
- Test with “node -v” should show version if correctly installed
- Git clone or download as zip (https://github.com/COMP4910-SavvyPlanBackend/Backend.git)
- Run “npm install -g nodemon”
- cd / move to directory
- Run “npm install”
- Copy and rename config.env.example to config.env
- Open config.env and put your values (from Stripe,SendGrid,Mongo) there (example will be provided in Appendix C)
- Run “npm start”
- Api will be available at localhost:5000/api/{users,purchases,stores}/{route}
- Set NODE_ENV to production for live emails to the users email. Note: variable may not be loaded in this mode as Heroku loads them in production and dotenv in Dev
- Demo Backend Version: https://savvyplantest.herokuapp.com/api/