Coder Social home page Coder Social logo

hebronrest-updated's Introduction

Hebron Rest:

Description:

A website that shows the user several types of cuisines to choose from. When the user clicks on one of them, it shows a list of restaurants that serve that type of cuisine. It also allows you to add a resturant if you want, with a list of details about it using a form.

User journey:

  • As a user I'm able to choose a cuisine.
  • As a user I'm able to see a list of restaurants and some details about them.
  • As a user I'm able to add a new restaurant by filling a form only if I'm logged into the website.
  • As a user I sign up to the website.

Wireframe:

  • Home page:

  • Login and sign up:

image

File Structure:

  • public:

    • images:
      • 1.png
      • 2.png
      • 3.png
      • AbuMazin.png
      • TabonAlreef.png
      • KFC.png
      • RozaChrunchy.png
      • Q-Cany.png
      • Segafredo.png
      • logo.png
    • index.html
    • style.css
    • index.js
  • src:

    • database:
      • test:
        • databaseTest.js
      • db_build.js
      • db_build.sql
      • db_connection.js
    • queries:
      • getData.js
      • postData.js
    • server:
      • test:
        • test.js
      • handler.js
      • router.js
      • server.js
  • .gitignore
  • .travis.yml
  • package.json
  • README.md

Schema:

Website flow:

image

Team:

hebronrest-updated's People

Contributors

duaah avatar randinaim avatar jema28 avatar saharadem avatar 95rawan avatar dependabot[bot] avatar

Watchers

James Cloos avatar eadehemingway avatar

Forkers

duaah randinaim

hebronrest-updated's Issues

validation

there is no any validation like email

Asynch function

Database queries are asynch function so you have to make sure the data has been added into the database before setting the header and check the errors as well

postData(result, (err, data) => {});
res.writeHead(302, { Location: '/' });
res.end();

Database instructions

Add the instructions of building a local database on the README. describe for the users how they can run the code locally

Create database

We're creating a new local database and updating the one we stole from the previous restaurant project

Check the cookies

Why did you pass a file as a parameter since you can check the cookies as a first step and handle the page depend on the result like:

if(req.headers.cookie === undefined){
// handle the login/signup page
}else{
// get the cookies values and handle the home page
}

let filePath = path.join(__dirname, '..', '..', 'public', `${page}.html`);
if (page === 'profile') {

Some Modules are missing!

These modules do not exist in your package json file bycrept, jsonwebtoken query-string and cookie

null obj in dom

image

in login page no button search and id then will be return null and you can't addEventListener for null

you can create new file dom

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.