Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parkade (SmartPark)

Parkade is a full-stack web application for parking slot management and reservations. The application allows users to view available parking slots, make reservations, and manage their bookings.

Tech Stack

Frontend

  • Framework: React with TypeScript
  • Build Tool: Vite
  • Styling: Tailwind CSS
  • UI Components: shadcn-ui

Backend

  • Environment: Node.js
  • Framework: Express.js
  • Database: MySQL
  • Authentication: JWT (JSON Web Tokens) & bcryptjs for password hashing

Project Structure

parkade/
├── frontend/               # React frontend application
├── middleware/             # Express middlewares (e.g., Auth)
├── routes/                 # API routes (Auth, Parking Slots, Reservations)
├── server.js               # Express application entry point
├── db.js                   # Database connection setup
└── package.json            # Backend dependencies

Features

  • User Authentication: Secure login and registration using JWT.
  • Parking Slots Management: View and interact with available parking spaces.
  • Reservations System: Book parking slots and manage user reservations.

Getting Started

Prerequisites

  • Node.js (v16+)
  • MySQL Server

Database Setup

  1. Create a MySQL database for the application.
  2. In the root parkade directory, create a .env file with your database credentials:
    DB_HOST=localhost
    DB_USER=your_mysql_user
    DB_PASS=your_mysql_password
    DB_NAME=your_database_name
    PORT=5000
    JWT_SECRET=your_jwt_secret_key

Backend Setup

  1. Navigate to the root directory:
    cd parkade
  2. Install dependencies:
    npm install
  3. Start the backend server:
    npm start
    # or run with node: node server.js

Frontend Setup

  1. Open a new terminal and navigate to the frontend directory:
    cd parkade/frontend
  2. Install frontend dependencies:
    npm install
  3. Start the development server:
    npm run dev

The backend server will run on http://localhost:5000 and the frontend application will usually be available at http://localhost:5173.

API Endpoints Overview

  • POST /api/auth/register - Register a new user
  • POST /api/auth/login - Authenticate user and receive JWT
  • GET /api/parking-slots - Retrieve parking slots
  • POST /api/reservations - Create a new reservation
  • GET /api/reservations - Get user reservations

License

ISC

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages