Skip to content

A loyalty card system for a retro video game store takes customers ("Chrononauts") on a journey through gaming history, while managers ("Chiefs") orchestrate this return to the past.

Notifications You must be signed in to change notification settings

mathusanm6/RetroGameGems

Repository files navigation

RetroGameGems

Table of contents

  1. Project context
  2. Contributors
  3. My contributions
  4. Demo and screenshots
  5. Installation
  6. Usage
  7. Initialisation of the database
  8. To see the postgres database

Project context

Pair project for Semester 6 Web Programming course in 2023-2024 at Université Paris Cité (Campus Grands Moulins). The project is about creating a loyalty card system for a retro video game store. The project is divided into two parts: the client side and the manager side. The client side allows customers to view their transactions, points, and available gifts. The manager side allows the manager to manage clients, gifts, and transactions.

This project is developed using the following technologies:

  • Front-end: HTML, CSS, JavaScript, EJS, Bootstrap
  • Back-end: Node.js, Express.js
  • Database: PostgreSQL

Contributors

Nom Prénom
RAOUL Théo
SELVAKUMAR MATHUSAN

My contributions

  • Project setup
  • Database setup
  • Home page (Front-end and Back-end)
  • Client login page (Front-end and Back-end)
  • Manager login page (Front-end and Back-end)
  • Client dashboard (Front-end and Back-end)
  • Manager dashboard (Front-end and Back-end)

Demo and screenshots

Watch the demo video

Home Page Welcome to Retro Game Gems
Login Client Client login page Login Manager Manager login page
Dashboard Client Birthday Client dashboard on birthday
Dashboard Client Your Transactions Client transactions Dashboard Client Available Gifts Available gifts
Dashboard Client Shopping Cart Shopping cart Dashboard Client Order Confirmation Order confirmation
Dashboard Manager Manager dashboard
Dashboard Manager Modify Client Client management page Dashboard Manager Modify Gift Gift management page

Installation

  1. Clone the repository
git clone git@github.com:mathusanm6/RetroGameGems.git
  1. Install the dependencies
npm install express ejs bcryptjs express-session connect-pg-simple pg dotenv http-status-codes multer sharp csv-parser
  1. Create the database and the user needed for the project
psql -U postgres
CREATE ROLE myuser LOGIN PASSWORD 'mypassword';
CREATE DATABASE loyalty_card_db WITH OWNER = myuser;
  1. Launch the database setup script
node db_setup.js

Usage

  1. Launch the server
npm start
  1. Open a web browser and go to http://localhost:3000

Initialisation of the database

To access the manager dashboard, you need to log in as an administrator. The following administrators are added to the database:

email password first_name last_name
rtheo@mail.com theo Theo Raoul
smathusan@mail.com mathusan Mathusan Selvakumar

To add a new administrator, you need to add a record in the admin table of the database or use the db_setup.js script after modifying the db_setup.js file by adding a new administrator to the admins list.

When initializing the database, the following clients are added:

last_name first_name email password points birth_date
Doe John john.doe@mail.com john123 1210 CURRENT_DATE
Smith Jane jane.smith@mail.com jane123 750 CURRENT_DATE
Jones Alice alice.jones@mail.com alice123 500 CURRENT_DATE
Brown Bob bob.brown@mail.com bob123 3140 CURRENT_DATE
Davis Charlie charlie.davis@mail.com charlie123 1050 CURRENT_DATE

The birth date (birth_date) is set to CURRENT_DATE to simulate the birthday of the clients. The points field is initialized with random values.

To see the postgres database

psql -U myuser -d loyalty_card_db

About

A loyalty card system for a retro video game store takes customers ("Chrononauts") on a journey through gaming history, while managers ("Chiefs") orchestrate this return to the past.

Topics

Resources

Stars

Watchers

Forks