Skip to content

Latest commit

 

History

History
113 lines (80 loc) · 2.25 KB

README.md

File metadata and controls

113 lines (80 loc) · 2.25 KB

MailScheduling

Full stack application, which is used to send recurring mail using mongodb, express, reactjs, nodejs

Frontend Link
Server Api Doc Link

Usage

Clone app in your local

Add .env file and update values/setting to your own

NODE_ENV=dev
PORT=5000
MONGO_CONNECTION_STRING=
JWT_SECRET=
JWT_EXPIRY=30d
SERVICE=
EMAIL=
PASSWORD=
FROM_NAME=
FROM_EMAIL=
GOOGLE_CLIENT_ID=

Install Dependencies

# project_folder/server
npm install

# project_folder/client
npm install

Run App

# Run server
npm run dev

# Run Frontend
npm start

Access

 # Access the web app in browser:
 http://localhost:3000

 # Access the Server:
 http://localhost:5000/

Version: 1.0.0

Project Specification

Client

created with the help of react

dashboard

Main functionality

  • Login signin feature
  • Google-Login
  • create Mail schedular
  • view History Mail
  • view Panding Mail
  • design mail body

Backend

Backend part serve all functionality including authentication, authrization create mail save data and much more .

Main functionality

  • Login signin Api
  • google-login Api
  • create mail Api
  • send mail
  • get sent mail
  • get schedule mail
  • cron-job
  • save on database

screencapture-localhost-5000-api-doc-2021-06-27-20_51_07

Documentation

  • Use Swagger to create documentation
  • for swagger /api-docs for the api

Security

  • Encrypt passwords and reset tokens
  • Use cors to make API public

Code Related Suggestions

  • NPM scripts for dev and production env
  • Config file for important constants
  • Use controller methods with documented descriptions/routes
  • Error handling middleware
  • Authentication middleware for protecting routes and setting user roles
  • Validation using Mongoose and no external libraries
  • Use TypeScript which primarily provides optional static typing, classes and interfaces. One of the big benefits is to enable IDEs to provide a richer environment for spotting common errors as you type the code