Skip to content

Blacksmith API is an Express-based application for efficient store management in a medieval-themed setting. Built with Node.js, TypeScript, Express, and Sequelize ORM.

License

Notifications You must be signed in to change notification settings

gabrielmoisesa/blacksmith-api

Repository files navigation

Blacksmith API ⚒

The Blacksmith API is an Express-based application designed for efficient store management, providing comprehensive functionality for handling products, orders, and user-related operations.

Table of Contents
  1. Features
  2. Getting Started
  3. Tech Stack
  4. API Reference
  5. Acknowledgments
  6. License

Features

  • Product Crafting: Create and manage a catalog of custom medieval items, such as personalized swords.
  • Order Processing: Create and view orders.
  • User Authentication: JWT authentication for selected routes, ensuring a protected user experience.
  • Testing: Unit and integration tests for all routes, services and controllers, ensuring a reliable and robust application.

Getting Started

Follow the instructions below to get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Installation and Running

  1. Clone the repository:
git clone git@github.com:gabrielmoisesa/blacksmith-api.git
  1. Navigate to the project directory:
cd blacksmith-api
  1. Start and build the Docker containers:
docker-compose up -d --build
  1. Run the database reset script to create the database and seed it with some data:
npm run db:reset
  1. Access the API at http://localhost:3001.

Testing

  • npm test - Runs the test suite.
  • npm run test:coverage - Runs the test suite and generates a coverage report.

Coverage Report:

Coverage Report

Tech Stack

API Reference

Login:

POST /login - Authenticates a user and returns a JWT token.

Products:

GET /products - Returns a list of all products.

POST /products - Creates a new product.

Orders:

GET /orders - Returns a list of all orders.

POST /orders - Creates a new order. Requires authentication.

Acknowledgments

  • Trybe - Project setup and requirements.

License

MIT

About

Blacksmith API is an Express-based application for efficient store management in a medieval-themed setting. Built with Node.js, TypeScript, Express, and Sequelize ORM.

Topics

Resources

License

Stars

Watchers

Forks