Welcome to Vaahana, the Airbnb for motorbikes. Whether you want to list your idle bike to earn money or need a ride and wish to rent one, Vaahana is your platform.
- List Your Bike
- Receive Requests
- Earn Money
- Find a Bike
- Book It
- Ride and Return
- MERN: MongoDB, Express.js, React with TypeScript, and Node.js.
- MongoDB: For data storage.
- Express.js and Node.js: For server functionality.
Vaahana is open source. Contribute by fixing bugs, adding features, or offering suggestions. See our contributing guidelines.
- Docker: Install Docker Desktop or Docker Engine.
- Text Editor: Use any editor like VSCode or Sublime Text.
- Clone Your Repository: Clone your Git repository or ensure you have the project files.
- Navigate to Your Project: Go to the root directory with
docker-compose.yml
.
The docker-compose.yml
defines these services:
- Traefik: A reverse proxy on ports 80 and 8080.
- Server: The Node.js/Express backend.
- Client: The React frontend, depending on the Server service.
The application uses environment variables for configuration. These are stored in .env
files in the client/
and server/
directories.
The client/
directory contains a .env
file. Use the template at .env.sample.client
to create your own .env
file.
The server/
directory contains a .env
file. Use the template at .env.sample.server
to create your own .env
file.
Remember to replace the placeholders in these .env
files with your actual values. For security reasons, do not commit the .env
files to your repository.
- Build the Services: Execute
docker-compose build
. - Run the Services: Use
docker-compose up
. Use-d
for detached mode. - Check the Containers: Use
docker ps
.
The project is divided into two main directories:
client/
: Contains the frontend code of the application. Built with React and TypeScript.server/
: Contains the backend code of the application. Built with Express.js and Node.js.
Each directory has its own Dockerfile for containerization and a package.json file for managing dependencies.
- Client: Access at
http://client.vaahana.localhost
. Updatehosts
file for this URL. - Server: Access at
http://server.vaahana.localhost
. Updatehosts
file accordingly.
- Traefik: Configured for Docker and web interface entrypoints.
- Server: Updated environment variables and volume mappings.
- Client: Dependency on the server and updated environment variable.
- View Logs: Use
docker-compose logs [service_name]
. - Stopping Services: Use
docker-compose down
. - Traefik Dashboard: Access the web interface at
http://localhost:8080
.
Supports hot reloading for client and server code updates.
- Container Crashes: Check logs for errors.
- Network Issues: Check for port or URL conflicts.
- Docker Daemon: Ensure it's active.