London Restaurant and Cafe Information - Exciting!
You can see the delpoyed site here.
- Clone the repository to your local machine:
git clone https://github.com/fac28/db-issy-tess-tommaso-james
- Navigate to the project directory:
cd db-issy-tess-tommaso-james
- Install project dependencies using npm:
npm install
To run the project locally, follow these steps:
- Start the Node.js server:
npm start
- Open your web browser and visit http://localhost:3000 to access db-issy-tess-tommaso-james locally.
To run the project locally, follow these steps:
- Start the Node.js server:
npm run seed
npm run dev
Issy: DevOps
James: QA
Tess: Scrum
Tommaso: UX/UI
This project is a web application that allows users to input and display information about food places in London. Users can submit details such as the name of the food place, its address, postcode, and the type of food it serves. The application provides two main features: a submission form for users to input data, and a home page that lists all the food places submitted by users.
As a food enthusiast in London, I want to:
- Submit Information: be able to add information about a food place in London, including its name, address, postcode, and the type of food it serves, so that others can discover new places to eat.
- View All Food Places: see a list of all the food places that have been submitted by various users in London, so that I can explore different options for dining out.
Creating a schema for a project involving a database of Food and Coffee recommendations in London with many-to-many relationships requires careful planning to ensure that you can efficiently store and retrieve data. Here's an example of what the schema might look like:
Location Table: The location table stores restaurant location details, including id, name, street, and postcode. The UNIQUE constraint ensures unique locations based on name, street, and postcode.
Venue Table: The venue table represents restaurants with id and name fields. The location_id is a foreign key linking restaurants to locations, establishing a relationship between venues and their locations.
Cuisine Table: The cuisine table lists restaurant cuisines with an id and unique name field. It ensures cuisine uniqueness.
Venue_Cuisine Table: Venue_Cuisine defines the many-to-many relationship between venues and cuisines. It uses foreign keys, venue_id and cuisine_id, and enforces uniqueness. This table enables versatile search and filter features, crucial for locating restaurants by their cuisine offerings.
The project is organized as follows:
- Public directory: Contains CSS files for styling.
- Src directory: Three key functions drive the application in the src directory. The first, in index.js, initializes and configures the server, readying it to handle incoming requests. The second, found in server.js, manages core server logic, including routing for HTTP requests and form submissions. Lastly, templates.js hosts a function for dynamic HTML content generation, ensuring up-to-date information is presented on web pages by fetching data from the database.
- Database directory: Contains database-related code and the database schema.
- Model directory: Contains functions to interact with the database, including inserting and retrieving data.
- Test directory: Contains test cases for the application.
The project was created by JamesESS, Isobel Butler, Tess Phillips & Tommaso Orlandi.