Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Alomgir27/room-booking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Room Booking App

This is a room booking application built with React for the frontend using Vite as the bundler, and Node.js with MySQL and Sequelize ORM for the backend. It includes a seed script (seed.js) to populate the database with initial data.

Directory Structure

room-booking/
│
├── client/          # Frontend directory
│   ├── public/      # Static assets
│   └── src/         # React source code
│
├── server/          # Backend directory
│   ├── config/      # Configuration files
│   ├── controllers/ # API controllers
│   ├── models/      # Sequelize models
│   ├── routes/      # API routes
│   ├── seed.js      # Database seeding script
│   └── app.js       # Express application entry point
│
└── README.md        # Project documentation

Installation

  1. Clone the repository:

    git clone https://github.com/Alomgir27/room-booking.git
  2. Install dependencies for both frontend and backend:

    cd room-booking/client
    npm install
    cd ../server
    npm install

Configuration

  1. Database Configuration:

    • Open server/config/config.json.
    • Modify the development object with your MySQL database credentials.
  2. Environment Variables:

    • Create a .env file in the server directory.
    • Define environment variables such as PORT for the server.

Database Setup

  1. Migrate the database schema:

    cd server
    npx sequelize-cli db:migrate
  2. Seed the database with initial data:

    npx sequelize-cli db:seed:all

Running the Application

  1. Start the backend server:

    cd server
    npm run dev
  2. Start the frontend development server:

    cd client
    npm run dev
  3. Access the application at http://localhost:3000.

Usage

  • Navigate to http://localhost:3000 in your browser to view the application.
  • Use the provided functionality to book rooms and manage bookings.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published