Back-end only API for a art course directory website. Provides full CRUD functionality for training programs, courses, reviews, and users. Uses JSON Web Tokens for authenticaton.
This API contains the following features:
- Handles full CRUD operations on programs, courses, reviews, and users
- Provides search results within radius based on postcodes
- Handles the ability to upload, update, and delete images
- Stores JSON Web Token in cookies to authenticate users
- Sends password reset tokens via email using Mailtrap
- Protects, authenticates, and checks ownership of user roles for each route
- Encrypts passwords and reset tokens using encryption packages
- Prevents NoSQL injections, cross site scripting, and HTTP paramter pollution
- Adds additional security headers by default with the helmet package
- Adds rate limiting of 100 requests per 10 minutes
- Uses cors to make the API public
- Creative Arts Institute API documentation: https://creative-arts-institute-api.onrender.com
Note that free instance types on Render will spin down with inactivity. Please allow a few minutes for the live site to load.
- Node.js - JavaScript environment
- Express - Web framework for Node
- MongoDB Atlas - NoSQL database in the cloud
- Mongoose - Object modelling for MongoDB data
- Compass - GUI for MongoDB querying & analyzing
- Postman - API testing & workspace environment
- Render - Hosting & deployment
Rename the "configenv" file in the config folder to "config.env" and update the values/settings appropiately.
Make request to the API using the following URL pattern. Refer to the documentation for more details.
https://creative-arts-institute-api.onrender.com/api/v1/<resource>
Requests are limited to 100 per 10 minute window. Requests exceeding the limit will respond with a timeout.
npm install
npm run dev // Run in development
npm run start // Run in production
- Change email delivery platform from Mailtrap to SendGrid
- Front-end solution built on the React framework
- Website - morganba.net
- GitHub - @morganbanet
- Twitter - @morganbanet
Contact email can be found via GitHub profile.
Project and design is based on the Node.js API Masterclass With Express & MongoDB course by Brad Traversy on Udemy.