mirror of
https://github.com/Alvin-Zilverstand/challenge-11.git
synced 2026-03-06 13:21:54 +01:00
1ac852f2a157d73b92dc0d124ac16bbeb05e4bbc
Car Tuning CRM System
A modern CRM system for car tuning businesses, built with React and Node.js.
Features
- User authentication and authorization
- Customer management
- Contact history tracking
- Car modification details
- Modern, responsive UI
- Search and filter capabilities
Prerequisites
- Node.js (v14 or higher)
- MongoDB
- npm or yarn
Installation
- Clone the repository:
git clone <repository-url>
cd car-tuning-crm
- Install backend dependencies:
npm install
- Install frontend dependencies:
cd client
npm install
- Create a
.envfile in the root directory with the following variables:
MONGODB_URI=mongodb://localhost:27017/car-tuning-crm
JWT_SECRET=your-secret-key
PORT=5000
Running the Application
- Start the backend server:
npm run dev
- In a new terminal, start the frontend development server:
cd client
npm start
The application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
API Endpoints
Authentication
- POST /api/auth/login - User login
- POST /api/auth/register - Register new user (admin only)
Customers
- GET /api/customers - Get all customers
- GET /api/customers/:id - Get single customer
- POST /api/customers - Create new customer
- PUT /api/customers/:id - Update customer
- DELETE /api/customers/:id - Delete customer
Contacts
- GET /api/contacts/customer/:customerId - Get all contacts for a customer
- POST /api/contacts - Create new contact
- PUT /api/contacts/:id - Update contact
- DELETE /api/contacts/:id - Delete contact
Security
- All routes except login are protected with JWT authentication
- Passwords are hashed using bcrypt
- CORS is enabled for the frontend domain
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
Description
Languages
JavaScript
94.3%
CSS
3.3%
HTML
2.4%