Skip to content

AntonisAk/Softeng24-42

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

115 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InterPayToll 🛣️

PERN Stack License: MIT

Overview 📋

InterPayToll is a comprehensive toll interoperability and analytics system designed for highways. The project facilitates financial reconciliation of debts between toll operators due to cross-system vehicle transits and provides advanced analytics services.

Tech Stack 🛠️

Our application is built on the PERN stack:

  • PostgreSQL: Open-source ORDBMS supporting both SQL and JSON querying
  • Express.js: Fast, unopinionated web framework for Node.js
  • React: JavaScript library for building dynamic user interfaces
  • Node.js: JavaScript runtime for server-side applications

Prerequisites ✅

  1. Install and set up all PERN stack components
  2. Create two PostgreSQL databases:
    • interpaytoll (main database)
    • interpay_test (testing database)

Installation & Setup 🚀

1. Clone the Repository

git clone [your-repository-url]

2. Configure Environment

Navigate to back-end directory and create .env file:

# Server Configuration
PORT=9115
NODE_ENV=development

# Database Configuration
DB_USER=<yourusername>
DB_HOST=localhost
DB_NAME=interpaytoll
DB_PASSWORD=<yourpassword>
DB_PORT=5432

# Authentication
JWT_SECRET=your_jwt_secret_here

# Testing
TEST_DB_NAME=interpay_test

3. Install Dependencies

Run npm install manually in each directory (front-end/, back-end/, cli-client/).

4. Initialize Database

cd back-end/src
./generate-cert.sh                 # generate certificate for https
node scripts/initEmptyDb.js    # Creates schema and initializes user accounts

5. Start the Application

Backend:

cd back-end
node --watch src/server.js

Note: Run the postman collection if you have access to it.

CLI Setup:

cd cli-client/testing
chmod +x pretty42.sh
./pretty42.sh

Frontend:

cd front-end
npm run dev

6. Testing

Backend Tests:

cd back-end/__tests__
npm test

CLI Tests:

cd cli-client/__tests__
npm test

Screenshots 📸





Important Notes ⚠️

  • The frontend UI is designed for operators only. When logging in, ensure your username matches an operator account, otherwise features like charts won't be rendered.

About

Software Engineering Course 2024

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors