Here’s the updated version of the BusApp README, incorporating the new dependencies and other information you've provided:
Welcome to BusApp, a full-stack application designed to help users find bus routes, book tickets, and manage their bookings. This application consists of both a client-side and server-side implementation and is deployed on Vercel.
- Bus Route Search: Search for bus routes between various locations.
- Booking System: Users can book tickets and manage their reservations.
- Authentication: User login and registration functionality using Firebase.
- Payment Integration: Secure payment via Stripe for ticket purchases.
📁busApp
├── 📁client
└── 📁server
client
: Contains the frontend code built with Svelte.server
: Backend code that handles server-side logic, including API routes, Stripe integration, and Firebase authentication.
Here are some screenshots of BusApp in action:
To get started with BusApp, follow these steps:
- Node.js (>= v16)
- npm or yarn
- Firebase (for authentication)
- Stripe account (for payment integration)
- Vercel (for deployment)
-
Clone the repository:
git clone https://github.com/Abi-CP/busApp.git cd busApp
-
Install dependencies for both client and server:
-
For the client-side:
cd client npm install
-
For the server-side:
cd server npm install
-
-
Configure environment variables:
- Create a
.env
file in the root directory for both the client and server. - Add your Firebase and Stripe keys to the
.env
file.
Example
.env
for client:VITE_FIREBASE_API_KEY=your_firebase_api_key VITE_STRIPE_PUBLIC_KEY=your_stripe_public_key
Example
.env
for server:FIREBASE_API_KEY=your_firebase_api_key STRIPE_SECRET_KEY=your_stripe_secret_key
- Create a
-
Run the development servers:
-
Start the client:
cd client npm run dev
-
Start the server:
cd server npm run dev
-
-
Open your browser and visit http://localhost:3000 to view the app.
The server-side is powered by Node.js and uses several key dependencies for handling requests, user authentication, and payments:
- Express: Web framework for building the server.
- CORS: For handling cross-origin requests.
- dotenv: For environment variable management.
- firebase: Firebase SDK for authentication.
- Stripe: Payment gateway for processing transactions.
- geolib: A library for geographical calculations.
BusApp is deployed on Vercel for seamless server-side and frontend integration. For deployment, follow these steps:
-
Login to Vercel: Sign in or create an account at https://vercel.com.
-
Link your repository to Vercel.
-
Configure environment variables in the Vercel dashboard:
- Add Firebase and Stripe environment variables for both frontend and backend.
-
Deploy the app.
Once deployed, you will get a live URL where the app is accessible to users.
Feel free to fork this repository, submit issues, or open pull requests. We welcome contributions to improve the app!
If you have any questions, feel free to reach out or open an issue in the repository!