Skip to content

API of the webapp "Techmatch" using Express, MongoDB Atlas and Mongoose

Notifications You must be signed in to change notification settings

camilafbarcellos/techmatch-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌱 TechMatch - API

ℹ️ About The App

API developed for the webapp TechMatch, with a database that relays on the MongoDB Atlas cloud. Swagger documentation can be found online.

🚀 Available online on Render!

The front-end of the application can be found at its GitHub repository.

🚀 Available online on Vercel!

✔️ Features

  • Express API with complete CRUD routes to Questions, including token authentication for adding, updating and deleting a question;
  • Cloud MongoDB Atlas database with Questions collection;
  • Full Swagger documentation following the OpenAPI Specification;
  • Complete Postman collection containing all the REST API tests and a full detailed description;
    • You can download the JSON file of the Postman collection and import it directly to your Postman to check the full API description and request examples;
    • At Postman, follow Import > Select file to correctly import the collection and use it.
  • End-to-end tests for the API endpoints built with Jest and Supertest.
    • Performs unit tests on a development environment using MongoDB In-Memory Server to run an in-memory MongoDB instance and preserve the actual data.

⚙️ Technologies

TypeScript NodeJS Express MongoDB JWT Swagger Postman Jest

🚪 Endpoints

Questions Endpoints

Route Method Description
/questions POST Creates a new question
/questions GET Gets all questions
/questions/:id GET Gets a specific question by its ID
/questions/:id PUT Updates a specific question by its ID
/questions/:id DELETE Deletes a specific question by its ID

Authentication Endpoints

Route Method Description
/auth POST Authenticates the admin credentials and generates an JWT token that allows creating, updating and deleting questions

Documentation Endpoints

Route Method Description
/docs GET Swagger API documentation

🧱 Schemas

Questions Entity

FieldName Type Required
_id ObjectId true
category String true
question String true

User Admin Entity

FieldName Type Required
user String true
password String true

The user admin model is solely used for authenticating the API admin with a JWT token and doesn't represent a database collection.

🌟 Author

Camila Barcellos

↑ Back to top

About

API of the webapp "Techmatch" using Express, MongoDB Atlas and Mongoose

Topics

Resources

Stars

Watchers

Forks