A modern, full-stack solution for managing restaurant operations, built with scalable architecture.
π Live Demo: https://dine-map.vercel.app/
This Restaurant Management System is a robust, end-to-end application designed to streamline restaurant operations. It features a scalable backend built on Node.js, Express, and Clean Architecture principles, heavily utilizing Dependency Injection. The frontend is a modern React 19 application, focused on high performance and a rich user experience, styled with Tailwind CSS v4.
Data is securely managed using PostgreSQL via Prisma ORM, with Redis implemented for high-performance caching. The entire stack is fully typed with TypeScript, ensuring maximum reliability and developer productivity.
- π Secure Authentication: Robust JWT-based authentication with Access and Refresh tokens.
- π‘οΈ Role-Based Access Control (RBAC): Granular permissions for different user roles (Admin, Manager, Staff).
- π’ Restaurant CRUD: Complete lifecycle management for restaurant entities.
- π¦ Clean Architecture: Separation of concerns using Controllers, Services, and Repositories (with
tsyringefor DI). - β‘ High Performance: Integrated Redis caching for lightning-fast data retrieval.
- πΌοΈ Image Uploads: Seamless media handling using Cloudinary.
- π¨ Modern UI/UX: Built with React 19, Redux Toolkit, React Query, and responsive Tailwind styling.
- β Type Safety: End-to-end TypeScript implementation.
- Core: Node.js, Express.js, TypeScript
- Database & ORM: PostgreSQL, Prisma ORM
- Caching: Redis (
ioredis) - Architecture: Clean Architecture, Dependency Injection (
tsyringe) - Security: JWT, bcryptjs, Zod (validation)
- Storage: Cloudinary
- Core: React 19 (Vite), TypeScript
- State Management: Redux Toolkit, Redux Persist
- Data Fetching: TanStack React Query v5, Axios
- Styling & UI: Tailwind CSS v4, Lucide React, shadcn/ui
- Forms & Validation: React Hook Form, Zod
- Routing: React Router DOM v7
π¦ restaurant-management
βββ π backend/ # Node.js API server
β βββ π src/
β β βββ π controllers/ # Request handlers
β β βββ π services/ # Business logic
β β βββ π repositories/ # Database access layer
β β βββ π routes/ # API route definitions
β β βββ π DI/ # Dependency injection setup
β β βββ π cache/ # Redis caching logic
β β βββ π config/ # Environment and app config
β βββ π prisma/schema # Database schema
βββ π frontend/ # React client application
βββ π src/
β βββ π components/ # Reusable UI components
β βββ π pages/ # Application views
β βββ π store/ # Redux configuration
β βββ π services/ # API communication layer
β βββ π hooks/ # Custom React hooks
Follow these instructions to get the project up and running on your local machine.
Ensure you have the following installed:
- Node.js (v18 or higher)
- PostgreSQL
- Redis server running locally or remotely
Navigate to the backend directory and install dependencies:
cd backend
npm installCreate a .env file in the /backend directory based on the required variables:
# Server
PORT=5000
# Database (PostgreSQL)
DATABASE_URL="postgresql://user:password@localhost:5432/restaurant_db?schema=public"
# Redis
REDIS_URL="redis://localhost:6379"
# JWT Secrets
JWT_ACCESS_SECRET="your_super_secret_access_key_here"
JWT_REFRESH_SECRET="your_super_secret_refresh_key_here"
# Cloudinary (If applicable)
CLOUDINARY_CLOUD_NAME="your_cloud_name"
CLOUDINARY_API_KEY="your_api_key"
CLOUDINARY_API_SECRET="your_api_secret"Run database migrations and start the server:
# Generate Prisma Client & Run Migrations
npm run db:migrate
# Start the development server
npm run devOpen a new terminal, navigate to the frontend directory, and install dependencies:
cd frontend
npm installCreate a .env file in the /frontend directory:
VITE_API_URL="http://localhost:5000/api/v1"Start the Vite development server:
npm run devThe application should now be running at http://localhost:5173.
| Command | Description |
|---|---|
npm run dev |
Starts the server in development mode using nodemon. |
npm run build |
Compiles TypeScript and generates Prisma client. |
npm run start |
Runs the compiled application. |
npm run db:migrate |
Applies pending Prisma migrations to the database. |
| Command | Description |
|---|---|
npm run dev |
Starts the Vite development server. |
npm run build |
Builds the application for production. |
npm run lint |
Runs ESLint to check for code quality. |
Contributions, issues, and feature requests are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.
- React
- Node.js
- Prisma
- Tailwind CSS
- UI Components by shadcn/ui
- Icons by Lucide React
Haran
- GitHub: @haranck
Made with β€οΈ using TypeScript and React