Skip to content

Latest commit

 

History

History
88 lines (60 loc) · 2.24 KB

README.md

File metadata and controls

88 lines (60 loc) · 2.24 KB

CDMS: Crime Data Management System - Website

Requirements

Install the following:

npm i yarn -g

Note: The above command will install the yarn command globally on your device.

Installation

Step 1. Clone the Repository

git clone https://github.com/sophie210286/DBMS_Project.git

Step 2. Installation

In your project folder's terminal:

cd website
yarn

Step 3. Environment Variable

Create a file name .env.development in the website folder, and fill up the following inside:

NEXT_PUBLIC_HOST=<Your hosting service; By default it runs on localhost>
NEXT_PUBLIC_DB_USER=<Your postgresql user name where the database is stored; By default it runs on postgres>
NEXT_PUBLIC_DB_PASSWORD=<Your postgresql user password>
NEXT_PUBLIC_DB_PORT=<Your Port Number; By default it runs on 5432>
NEXT_PUBLIC_DB_NAME=<Your database name>

Note: If you are running the website on localhost, then you can ignore 'By defaults' but you still need to fill the remaining ones.

  • Dummy example .env.development
NEXT_PUBLIC_HOST=localhost
NEXT_PUBLIC_DB_USER=postgres
NEXT_PUBLIC_DB_PASSWORD=password
NEXT_PUBLIC_DB_PORT=5432
NEXT_PUBLIC_DB_NAME=cdms

Step 4. Populating the Database

Use the following data file to populate your database:

Note: The file will have all CREATE TABLE, CREATE INDEX, and INSERT INTO commands.

Step 5. Run the Website

yarn run dev

The website will run on http://localhost:3000 on your browser.

Project Structure

Path Description
/public Static files
/pages Web page Routes
/styles CSS styles
/components Functional components
/utils Database connection

Technologies