This project is a PhD application tracking application that scrapes data from Gmail, manages PhD application data, and stores it in a MongoDB database.
phd-application-tracker
├── src
│ ├── app.js
│ ├── config
│ │ ├── db.js
│ │ └── credentials.js
│ ├── controllers
│ │ ├── applicationController.js
│ │ └── userController.js
│ ├── models
│ │ ├── Application.js
│ │ └── User.js
│ ├── routes
│ │ ├── api.js
│ │ └── auth.js
│ ├── services
│ │ ├── gmailService.js
│ │ └── scrapingService.js
│ ├── utils
│ │ ├── emailParser.js
│ │ └── dateUtils.js
│ └── middleware
│ ├── auth.js
│ └── errorHandler.js
├── .env.example
├── .gitignore
├── package.json
├── README.md
└── server.js
-
Initialize the Project
- Run
npm init -yto create a new Node.js project.
- Run
-
Install Dependencies
- Install the necessary dependencies:
npm install express mongoose dotenv googleapis
- Install the necessary dependencies:
-
Set Up MongoDB
- Create a MongoDB database and configure the connection in
src/config/db.js.
- Create a MongoDB database and configure the connection in
-
Implement Models
- Define the data structure by implementing the models in
src/models.
- Define the data structure by implementing the models in
-
Create Controllers
- Handle business logic by creating controllers in
src/controllers.
- Handle business logic by creating controllers in
-
Set Up Routes
- Define API endpoints by setting up routes in
src/routes.
- Define API endpoints by setting up routes in
-
Implement Services
- Handle external interactions like Gmail scraping by implementing services in
src/services.
- Handle external interactions like Gmail scraping by implementing services in
-
Create Utility Functions
- Write utility functions for common tasks in
src/utils.
- Write utility functions for common tasks in
-
Add Middleware
- Implement authentication and error handling middleware in
src/middleware.
- Implement authentication and error handling middleware in
-
Configure Environment Variables
- Create a
.envfile based on the.env.exampletemplate for local development.
- Create a
-
Write Tests
- Ensure functionality and reliability by writing tests.
-
Document the Project
- Keep this README updated for clarity on usage and setup.
- Start the server by running
node server.js. - Access the API endpoints as defined in the routes.
Feel free to fork the repository and submit pull requests for any improvements or features.