A full-stack bakery management and ordering system built with Next.js, TypeScript, and Supabase.
Get up and running in just two commands:
# Install dependencies and setup the project
pnpm setup
# Start the development server
pnpm devThat's it! The app will be running at:
- Frontend: http://localhost:3000
- Backend: http://localhost:4000
Before you begin, make sure you have installed:
- Node.js (v18 or higher)
- pnpm (v8 or higher) - Install with:
npm install -g pnpm
If you prefer to set things up step by step:
git clone https://github.com/sshssn/Doughlicious.git
cd DoughliciousCreate a .env.local file in the root directory with your credentials:
# Supabase
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# Database
DATABASE_URL=your_database_url
# Clerk Authentication
CLERK_SECRET_KEY=your_clerk_secret_key
CLERK_WEBHOOK_SECRET=your_clerk_webhook_secret
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
# Stripe
STRIPE_SECRET_KEY=your_stripe_secret_key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
# URLs
NEXT_PUBLIC_BACKEND_URL=http://localhost:4000
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
FRONTEND_URL=http://localhost:3000
BACKEND_URL=http://localhost:4000# Root dependencies
pnpm install
# Backend dependencies
cd backend && pnpm install
# Frontend dependencies
cd ../frontend && pnpm installcd backend
# Generate Prisma client
pnpm run prisma:generate
# Run migrations
pnpm run prisma:migrate
# (Optional) Seed the database
pnpm run seed# From the root directory
pnpm devDoughlicious/
├── backend/ # Express + TypeScript backend
│ ├── src/
│ │ ├── api/ # API routes
│ │ ├── db/ # Database & Prisma
│ │ ├── services/ # Business logic
│ │ └── server.ts # Server entry point
│ └── package.json
├── frontend/ # Next.js frontend
│ ├── app/ # Next.js app directory
│ ├── components/ # React components
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utilities
│ └── package.json
├── scripts/ # Build & dev scripts
└── package.json # Root workspace config
pnpm setup- Complete project setup (install deps, migrations, etc.)pnpm dev- Start both frontend and backend in development modepnpm dev:frontend- Start only th-pnpm dev:backend- Start only the backendpnpm sync-env- Sync environment variables
pnpm dev- Start backend dev serverpnpm build- Build for productionpnpm prisma:generate- Generate Prisma clientpnpm prisma:migrate- Run database migrationspnpm seed- Seed the databasepnpm test:db- Test database connection
pnpm dev- Start frontend dev serverpnpm build- Build for productionpnpm start- Start production server
- User Authentication - Powered by Clerk
- Payment Processing - Stripe integration
- Order Management - Full order lifecycle tracking
- Loyalty Program - Points and rewards system
- Admin Dashboard - Manage products, orders, and users
- Real-time Updates - Live order status updates
The project uses PostgreSQL via Supabase with Prisma ORM. The schema includes:
- Users & Authentication
- Products & Categories
- Orders & Order Items
- Loyalty Points
- Admin Management
The frontend is configured for Vercel deployment. Make sure to:
- Set all
NEXT_PUBLIC_*environment variables in Vercel - The build command is:
next build - The output directory is:
.next
The backend can be deployed to any Node.js hosting service:
- Set all environment variables
- Run
pnpm buildto compile TypeScript - Start with
node dist/server.js
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is private and proprietary.
Make sure all dependencies are installed:
cd frontend && pnpm installCheck your DATABASE_URL in .env.local and ensure your database is accessible.
Change the ports in your environment variables or kill the process using the port:
# Find process on port 3000
lsof -ti:3000 | xargs kill -9
# Find process on port 4000
lsof -ti:4000 | xargs kill -9For issues or questions, please open an issue on GitHub.