Skip to content

Repository files navigation

InstaCart - Instant Shopping & Delivery App

A full-stack e-commerce application built with Next.js, Express, PostgreSQL, and Prisma.

Tech Stack

  • Frontend: Next.js 14 (App Router), TypeScript, Tailwind CSS, shadcn/ui, Zustand
  • Backend: Node.js, Express, TypeScript, Prisma ORM
  • Database: PostgreSQL
  • Cache/Queue: Redis
  • Real-time: Socket.io
  • Auth: JWT (access + refresh tokens)
  • File Storage: Cloudinary
  • Payments: Razorpay/Stripe

Project Structure

instamart/
├── apps/
│   ├── web/          # Customer frontend (Next.js)
│   └── admin/        # Admin panel (Next.js)
├── packages/
│   ├── api/          # Express backend
│   └── types/        # Shared TypeScript types

Getting Started

Prerequisites

  • Node.js 18+ and npm/yarn/pnpm
  • Docker and Docker Compose
  • PostgreSQL (via Docker)
  • Redis (via Docker)

Installation

  1. Clone and install dependencies:
npm install
  1. Start Docker services (PostgreSQL + Redis):
docker-compose up -d
  1. Set up environment variables:

Create .env files in:

  • packages/api/.env
  • apps/web/.env.local
  • apps/admin/.env.local

See .env.example files in each directory.

  1. Set up database:
npm run db:generate
npm run db:migrate
npm run db:seed
  1. Start development servers:
npm run dev

This will start:

Available Scripts

  • npm run dev - Start all apps in development mode
  • npm run build - Build all apps for production
  • npm run lint - Lint all apps
  • npm run db:generate - Generate Prisma client
  • npm run db:migrate - Run database migrations
  • npm run db:seed - Seed database with sample data
  • npm run db:studio - Open Prisma Studio

Default Credentials

After seeding, you can login with:

Admin:

Customer:

Features

Customer App

  • User registration & authentication
  • Product browsing & search
  • Shopping cart
  • Order placement & tracking
  • Profile management
  • Address management
  • Order history

Admin Panel

  • Dashboard with analytics
  • Product management (CRUD)
  • Category management
  • Order management
  • User management
  • Inventory tracking

API Documentation

API endpoints are available at: http://localhost:4000/api/v1

See API_DOCS.md for detailed endpoint documentation.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages