Skip to content

Repository files navigation

ShelfWise Backend

E-commerce backend API built with NestJS, Prisma, and PostgreSQL with Clerk authentication.

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • Clerk account (for authentication)

Installation

  1. Install dependencies:
npm install
  1. Configure environment variables:
cp .env.example .env

Edit .env with your configuration:

DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=public"
PORT=3000
JWTSECRETKEY="your-jwt-secret-key"
EMAILUSER="your-email@gmail.com"
EMAILPASS="your-gmail-app-password"
NODE_ENV="development"

# Clerk Configuration
CLERK_SECRET_KEY="your-clerk-secret-key"
CLERK_PUBLISHABLE_KEY="your-clerk-publishable-key"

# Frontend URL for CORS
FRONTEND_URL="http://localhost:3001"
  1. Run database migrations:
npx prisma migrate dev
  1. Generate Prisma Client:
npx prisma generate
  1. Start the development server:
npm run start:dev

The API will be available at http://localhost:3000

📚 Documentation

🔑 Authentication

This API uses Clerk for authentication. All protected endpoints require a valid Clerk JWT token in the Authorization header:

Authorizat

About

Backend system for store management built with NestJS and PostgreSQL. Manages products, orders, inventory, and users with secure API endpoints and database optimization.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages