Calendar app is a web application for manage your life private events using a Calendar. Create an account and start organizing your days.
You are the only admin of your events, being able to:
- Create events
- Title, notes (optional), start date, end date
- Update events
- Delete events
- View other people events (now only private events from march 2023)
Visit the deployed app at Calendar App
Check the frontend code and tech stack at Calendar Front github repository
Update
From march 2023 you can only see your events, that means all the events are now private.
It's the source code for the backend of the calendar app.
This project was created using the M.E.R.N. stack that stands for MongoDB, Express.js, React.js and Node.js
- Backend runtime - node.js
- Web Api framework - express.js
- Database - mongoDB
- Cloud database - mongoatlas
- Continuous Deployment - Render.com
- Main programming languaje - javascript
Read other project dependencies in the package.json file.
Check the frontend code and tech stack at Calendar Front github repository
- Rename the .env.template file to .env and prepare to complete the info.
- In the .env file, set the PORT your app will be running and the SECRET_JWT_SEED that will be used to sign and verify the json web tokens, it can be any string, the longer the string, the better.
- Get the connection string for mongoDB database. Check docs.
- Run the app:
- Local mode: Run the command npm run dev.
- Production mode: Configure the deployment host to run npm run start.
- Consume the api with the available endpoints, example: get all the events -> GET /host/api/events.
All the endpoints start with /api/...
/auth -> auth routes file
- POST /new - Creates a new user (name, email & passsword)
- POST /login - Login an existing user (email & password)
- GET /renew - Renews user token, old token must come in headers as "x-token"
/events -> events routes file
When consuming all events routes, the token must come in headers:
headers - "x-token": token given when login
- POST / - Creates a new event (title, start, end & notes(optional))
- GET / - Gets all the events
- PUT /:id - Updates an existing event by id
- DELETE /:id - Delete an event by id
Starts the node server using nodemon dependency, run this for development purposes, it will automatically detect changes and refresh the server.
Run this for production mode, this starts the server using simply node command.