Skip to content

API for an art course directory built with Express, Node, and MongoDB Atlas

Notifications You must be signed in to change notification settings

morganbanet/art-course-api

Repository files navigation

Creative Arts Institute API

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.

Table of contents

Overview

Features

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

Screenshots

screenshot

Links

Note that free instance types on Render will spin down with inactivity. Please allow a few minutes for the live site to load.

Development

Technologies

  • 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

Usage

Rename the "configenv" file in the config folder to "config.env" and update the values/settings appropiately.

Making requests

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.

Install dependencies

npm install

Run application

npm run dev       // Run in development
npm run start    // Run in production

Continued development

  • Change email delivery platform from Mailtrap to SendGrid
  • Front-end solution built on the React framework

Contact

Contact email can be found via GitHub profile.

Acknowledgements

Project and design is based on the Node.js API Masterclass With Express & MongoDB course by Brad Traversy on Udemy.

About

API for an art course directory built with Express, Node, and MongoDB Atlas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages