Git Product home page Git Product logo

cafeteria's Introduction

Cafeteria

Used Framework, Language and Database

  • NextJS
  • Tailwind CSS
  • Javascript
  • CSS
  • NodeJS
  • TypeScript
  • MySQL

Getting Started

  1. Clone the repository in terminal as below command.
git clone https://github.com/panda15963/Cafeteria.git
  1. Process command to run the project as below.
docker-compose up
  1. Open http://localhost:3000 on your browser

SQL Table

  1. You should create database named "cafeteria" firstly.
  2. Create table with following sql code.

User Table

CREATE TABLE users (
        id VARCHAR(36) DEFAULT (UUID()) PRIMARY KEY, 
        email VARCHAR(255) NOT NULL UNIQUE,
        name VARCHAR(255) NOT NULL,
        username VARCHAR(255) NOT NULL UNIQUE,
        password VARCHAR(255) NOT NULL,
        phonenumber VARCHAR(255) NOT NULL,
        address VARCHAR(255) NOT NULL
    );

Cart Table

CREATE TABLE carts (\
    id INT AUTO_INCREMENT PRIMARY KEY,
    user_id VARCHAR(36) NOT NULL,
    image VARCHAR(255) NOT NULL,
    name VARCHAR(255) NOT NULL UNIQUE,
    price FLOAT(11) NOT NULL,
    amount INT(11) NOT NULL,
    total FLOAT(11) NOT NULL,
    FOREIGN KEY (user_id) REFERENCES users(id)
);
  1. Register and login for a new user. Then click the menu button at top right corner.
  2. Try to add product into cart by clicking plus button or minus button.
  3. Click checkout button if you want to buy something. However, if you click "Place Order", it will be failed because I coded to pop up an alert and move to main page.

Example

  • Main main1 main2
  • Register register
  • Login Login
  • Menu items
  • Details details

cafeteria's People

Contributors

panda15963 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.