Skip to content

RobertoDebarba/pizzeria-management-angular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

login main order

Prerequisites

How to run

Database

  1. Create database schema running the file backend/database.sql

Backend

  1. cd backend
  2. npm install
  3. npm install -g gulp
  4. npm run build
  5. npm start
  6. npm run watch for watch source changes

Runs on localhost:3000

Frontend

  1. cd frontend
  2. npm install
  3. npm install -g @angular/cli
  4. 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
    }[]

}