AutoFixHub is a web application designed for an automotive service center. It allows customers to book appointments, order car parts, and track their service history. The platform also provides a dashboard for mechanics and admins to manage appointments, orders, and users.
- Features
- Tech Stack
- Installation
- Environment Variables
- Usage
- API Endpoints
- File Structure
- Contributing
- License
- Contact
- User Authentication: Secure registration and login using JWT tokens.
- Admin Panel: Manage users, appointments, and orders.
- Mechanic Dashboard: View and update assigned appointments.
- Order Management: Customers can order car parts and track their orders.
- Payment Integration: Integrated with Stripe for secure payments.
- Responsive Design: Works on all devices (mobile, tablet, desktop).
- React.js
- Tailwind CSS
- Axios for HTTP requests
- Node.js
- Express.js
- MongoDB with Mongoose
- JWT for authentication
- Stripe API for payments
Ensure you have the following installed:
- Node.js
- MongoDB
- Stripe account (for payment integration)
-
Clone the repository:
git clone https://github.com/yourusername/AutoFixHub.git cd AutoFixHub
-
Install dependencies:
Navigate to the backend and frontend directories and install dependencies.
For Backend:
cd backend npm install
For Frontend:
cd frontend npm install
-
Start the development server:
For Backend:
npm start
For Frontend:
npm start
The frontend will run on
http://localhost:3000
and the backend onhttp://localhost:3001
.
Create a .env
file in the backend
directory with the following variables:
# MongoDB connection string
MONGO_URI=mongodb://localhost:27017/autofixhub
# JWT Secret
JWT_SECRET=your_jwt_secret
# Stripe API key
STRIPE_SECRET_KEY=your_stripe_secret_key
# Node environment
NODE_ENV=development
# Port for backend server
PORT=3001
- Sign Up / Login: Users can create an account or log in using their credentials.
- Browse Parts: Users can browse available car parts and add them to the cart.
- Checkout: Users can proceed to checkout and make payments using Stripe.
- Book Appointments: Users can book service appointments and choose a mechanic.
- Order Tracking: Users can track their order status and view past orders.
- Dashboard: Admins can view and manage users, appointments, and orders.
- Assign Tasks: Admins can assign appointments to mechanics.
- Order Management: Admins can view and update order statuses.
- View Assignments: Mechanics can view appointments assigned to them.
- Update Status: Mechanics can update the status of appointments.
- POST /api/auth/register: Register a new user.
- POST /api/auth/login: Login and receive a JWT token.
- POST /api/orders: Create a new order.
- GET /api/orders: Get all orders (admin only).
- GET /api/orders/:id: Get order by ID.
- POST /api/appointments: Create a new appointment.
- GET /api/appointments: Get all appointments (admin and mechanic only).
- GET /api/appointments/:id: Get appointment by ID.
- GET /api/users: Get all users (admin only).
- GET /api/users/:id: Get user by ID.
- GET /api/products: Get all products.
- GET /api/products/:id: Get product by ID.
AutoFixHub/
├── backend/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├── config/
│ ├── server.js
│ └── .env
└── frontend/
├── src/
│ ├── components/
│ ├── pages/
│ ├── App.js
│ └── index.js
├── public/
├── .env
└── package.json
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or suggestions, feel free to reach out:
- Email: Mail me
- LinkedIn: Your LinkedIn Profile
- GitHub: GitHub Profile