Pizzeria Management System in Angular 2 and NodeJS
This a sample pizzeria management system made with Node (ExpressJs + TypeScript) and Angular 2 (with CoreUI).
Main features
- User authentication
- Clients CRUD
- Products CRUD
- Orders CRUD
Prerequisites
How to run
Database
- Create database schema running the file
backend/database.sql
Backend
cd backend
npm install
npm install -g gulp
npm run build
npm start
npm run watch
for watch source changes
Runs on localhost:3000
Frontend
cd frontend
npm install
npm install -g @angular/cli
npm start
Runs on localhost:4200
Default system user/password: admin1/senha
Authors
API documentation
Client
name:string,
cpf:number,
phone1:number,
phone2:number,
address:{
place:string,
city:string,
zipCode:number,
number:number,
neighborhood:string,
info:string
}
Product
{
id: number,
name: string,
price: number
}
Order
{
id: number,
date: string,
status: string,
client: Client,
products: {
product: Product,
amount: number
}[]
}
GET /api/client
Response body:
Client[]
GET /api/client/:cpf
Response body:
Client
POST /api/client
Request body:
Client
GET /api/product
Response body:
Product[]
GET /api/product/:id
Response body:
Product
DELETE /api/product/:id
POST /api/product
Request body:
Product
GET /api/order
Response body:
Order[]
GET /api/order/:id
Response body:
Order
POST /api/order
POST /api/order/complete/:id
POST /api/order/cancel/:id
Request body:
{
id: number,
date: string,
status: string,
client: number[],
products: {
id: number,
amount: number
}[]
}