Our website allows the user to read the recommended restaurants of others and submit their own restaurant recommendation.
You can find our site hosted on Heroku
- Make the website accessible #12
- Ensure responsiveness on the website #10
- WRITE STYLING! Improve the website design #11
Our site uses a database with the following schema:
restaurants
| column | type | constraints |
|---|---|---|
| id | integer | primary key autoincrement |
| name | text | not null |
| description | integer | |
| address | text | |
| price_range | integer |
reviews
| column | type | constraints |
|---|---|---|
| id | integer | primary key autoincrement |
| name | text | not null |
| review | text | |
| rating | integer | |
| restaurants_id | references restaurants(id) |
CREATE TABLE IF NOT EXISTS restaurants (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
address TEXT,
price_range INTEGER
);
CREATE TABLE IF NOT EXISTS reviews (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
review TEXT,
rating INTEGER,
restaurants_id REFERENCES restaurants(id)
);Make sure you have Git and Node (v18) installed.
- Clone this repo and
cdinto the directory - Run
npm installto install all the dependencies - Run
npm run seedto seed the local database - Run
npm run devto start the server
This uses the nodemon library to auto-restart the server when you save changes.
Our test folder contains three tests.
- Test 1 Tests the home get and post route as well as one for missing routes.
- Test 2 Tests for the ability to add an entry to the restaurants table in the database.
- Test 3 Tests for the ability to retrieve all entries from the restaurants table in the database.
To run:
npm run test:1
npm run test:2
npm run test:3
-
As a user, I want to: submit information to your site for anyone to see
-
As a user, I want to: come back to your site later and see what I posted is still there
- As a picky user, I want to: view filtered/sorted data (eg only restaurants within a particular price range), instead of just all of it
- GitHub Actions CI setup to run your tests when you push
- A form for users to submit data
- A page showing all the data
- Semantic form elements with correctly associated labels
- A SQLite database
- A schema describing your database in your README
- Tests for server routes and database access
- Not process user input as SQL commands
- Hidden environment variables (i.e. not on GitHub)