Skip to content

Used Express, Postgresql, Prisma and Docker to build a complete server api.

Notifications You must be signed in to change notification settings

vawn-t/c-store-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

C-Store API

πŸš€ Overview

C-Store API serves as the backend infrastructure for a convenience store management system, providing endpoints for product management, order processing, user authentication, and inventory control. Built with performance, security, and scalability in mind.

πŸ’» Technology Stack

  • Runtime Environment: Node.js
  • Framework: Express.js
  • Database: PostgreSQL with Prisma ORM
  • Authentication: JWT-based token authentication
  • Containerization: Docker

πŸ“‹ Prerequisites

  • Node.js v20+
  • PostgreSQL v16+
  • Docker (optional for containerized deployment)

βš™οΈ Installation & Setup

Check out this guide

πŸ“š API Documentation

For detailed information about available endpoints and request/response formats, refer to the documentation in the /documents/apis/ directory.

πŸ“ Directory Structure

c-store-api/
  β”œβ”€β”€ documents/                      # Comprehensive API documentation
  β”‚     β”œβ”€β”€ apis/                     # Endpoint-specific documentation
  β”‚     β”‚     β”œβ”€β”€ authentication/     # Auth-related API docs
  β”‚     β”‚     β”œβ”€β”€ catalogue/          # Product management API docs
  β”‚     β”‚     β”œβ”€β”€ shipping-method/    # Shipping and delivery API docs
  β”‚     β”‚     └── user/               # User management API docs
  β”‚     β”œβ”€β”€ app-flow/                 # Application flow diagrams
  β”‚     β”œβ”€β”€ entity-relationship/      # Database ER diagrams
  β”‚     └── sequences/                # Sequence diagrams for key processes
  β”‚
  └── api-server/                     # Server codebase
        β”œβ”€β”€ prisma/                   # Database ORM configuration
        β”‚     β”œβ”€β”€ schema.prisma       # Prisma schema definition
        β”‚     └── seed.ts             # Database seeding script
        β”‚
        └── src/                      # Source code
              β”œβ”€β”€ controllers/        # Request handlers and response formatters
              β”œβ”€β”€ helper/             # Helper utilities and common functions
              β”œβ”€β”€ middlewares/        # Express middlewares (auth, validation, etc.)
              β”œβ”€β”€ routes/             # API route definitions
              β”œβ”€β”€ services/           # Business logic implementation
              β”œβ”€β”€ utils/              # Utility functions and helpers
              └── validator.ts        # Request validation functions

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Used Express, Postgresql, Prisma and Docker to build a complete server api.

Resources

Stars

Watchers

Forks