{"id":21763304,"url":"https://github.com/techjmi/car_list","last_synced_at":"2026-04-09T17:51:56.058Z","repository":{"id":262899241,"uuid":"888708309","full_name":"techjmi/car_list","owner":"techjmi","description":"Car Management","archived":false,"fork":false,"pushed_at":"2024-11-16T18:41:13.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T01:28:09.705Z","etag":null,"topics":["flowbite","jwt","management","mern-stack","nodejs","project","reactjs","tailwindcss"],"latest_commit_sha":null,"homepage":"https://car-list-j0gy.onrender.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techjmi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-14T21:40:09.000Z","updated_at":"2024-11-16T20:25:06.000Z","dependencies_parsed_at":"2024-11-14T22:32:46.863Z","dependency_job_id":null,"html_url":"https://github.com/techjmi/car_list","commit_stats":null,"previous_names":["techjmi/car_list"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjmi%2Fcar_list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjmi%2Fcar_list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjmi%2Fcar_list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjmi%2Fcar_list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techjmi","download_url":"https://codeload.github.com/techjmi/car_list/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244739940,"owners_count":20501990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flowbite","jwt","management","mern-stack","nodejs","project","reactjs","tailwindcss"],"created_at":"2024-11-26T12:14:57.055Z","updated_at":"2025-12-30T22:11:56.857Z","avatar_url":"https://github.com/techjmi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Car Management Application\n\nThis project is a **Car Management Application** built with the **MERN stack** (MongoDB, Express, React, Node.js) and **JWT Authentication**. The application allows users to manage cars, including adding, editing, deleting, and viewing cars. Users can only manage their own cars after logging in. The project also uses **Firebase** for image storage and **Tailwind CSS** for styling.\n\n## Features\n\n- **User Authentication**: Users can sign up, log in, and log out using JWT for secure authentication.\n- **Car Management**: Users can add, edit, and delete their own cars.\n- **Responsive Design**: The frontend is fully responsive and uses Tailwind CSS for styling.\n- **Image Storage**: Images are uploaded to Firebase Storage and stored in the backend as URLs.\n- **APIs**: All backend operations (user authentication and car management) are exposed through RESTful APIs.\n- **Postman Testing**: All APIs have been tested in Postman to ensure proper functionality.\n\n## Technologies Used\n\n- **Backend**: Node.js, Express, JWT, Firebase\n- **Frontend**: React, Tailwind CSS\n- **Database**: MongoDB (hosted on Render)\n- **Image Storage**: Firebase Storage\n- **Deployment**: Backend and frontend are deployed separately on Render\n\n## Deployment URLs\n\n- **Backend API**: [https://car-backend-bm7z.onrender.com](https://car-backend-bm7z.onrender.com)\n- **Frontend**: [https://car-list-j0gy.onrender.com/](https://car-list-j0gy.onrender.com/)\n\n## Repositories\n\n- **Backend Repository**: [Car Management Backend](https://github.com/your-username/car-management-backend)\n- **Frontend Repository**: [Car Management Frontend](https://github.com/your-username/car-management-frontend)\n\n## How to Run Locally\n\nFollow these steps to run the project on your local machine.\n\n### 1. Clone the Repositories\n\n```bash\ngit clone https://github.com/your-username/car-backend.git\ngit clone https://github.com/your-username/car-list.git\n```\n\n### 2. Backend Setup\n\n1. Navigate to the backend folder:\n\n    ```bash\n    cd car-management-backend\n    ```\n\n2. Install the required dependencies:\n\n    ```bash\n    npm install\n    ```\n\n3. Set up environment variables:\n\n    - Create a `.env` file in the `backend` directory and add the following:\n\n    ```env\n    JWT_SECRET=your_jwt_secret\n    MONGODB_URI=your_mongodb_connection_string\n    FIREBASE_BUCKET_URL=your_firebase_storage_url\n    ```\n\n4. Run the backend:\n\n    ```bash\n    npm start\n    ```\n\nThe backend will be running on `http://localhost:5000`.\n\n### 3. Frontend Setup\n\n1. Navigate to the frontend folder:\n\n    ```bash\n    cd car-management-frontend\n    ```\n\n2. Install the required dependencies:\n\n    ```bash\n    npm install\n    ```\n\n3. Run the frontend:\n\n    ```bash\n    npm start\n    ```\n\nThe frontend will be running on `http://localhost:3000`.\n\nNow, you can visit `http://localhost:3000` in your browser to use the Car Management Application locally.\n\n---\n\n## API Documentation\n\n### 1. **User Authentication APIs**\n\n- **POST /api/signup**  \n  Create a new user.\n  - **Request Body**: \n    ```json\n    {\n      \"fullName\": \"John Doe\",\n      \"email\": \"johndoe@example.com\",\n      \"profile_pic\": \"https://example.com/johndoe.jpg\", \n      \"password\": \"password123\"\n    }\n    ```\n  - **Response**: Success message or error.\n\n- **POST /api/signin**  \n  Login to an existing user account.\n  - **Request Body**: \n    ```json\n    {\n      \"email\": \"johndoe@example.com\",\n      \"password\": \"password123\"\n    }\n    ```\n  - **Response**:  \n    ```json\n    {\n      \"token\": \"jwt-token\"\n    }\n    ```\n\n- **POST /api/logout**  \n  Log out the current user by invalidating the JWT token.\n  - **Response**: Success message.\n\n### 2. **Car Management APIs**\n\n- **POST /car/create**  \n  Add a new car (requires authentication).\n  - **Headers**: \n    - `Authorization: Bearer \u003cJWT_TOKEN\u003e`\n  - **Request Body**: \n    ```json\n    {\n      \"title\": \"Car Title\",\n      \"description\": \"Car Description\",\n      \"images\": [\"image-url-1\", \"image-url-2\"],\n      \"tags\": {\n        \"car_type\": \"SUV\",\n        \"company\": \"Toyota\",\n        \"dealer\": \"Local Dealer\"\n      }\n    }\n    ```\n  - **Response**: Success message or error.\n\n- **GET /car/user-car-list**  \n  Get all cars created by the authenticated user (requires authentication).\n  - **Headers**: \n    - `Authorization: Bearer \u003cJWT_TOKEN\u003e`\n  - **Response**: List of cars created by the user.\n\n- **GET /car/car-list**  \n  Get a list of all available cars (no token required).\n  - **Response**: List of all cars.\n\n- **GET /car/car-details/{id}**  \n  View details of a specific car by its ID (no token required).\n  - **Response**: Car details object.\n\n- **GET /car/edit/{id}**  \n  Edit car details (requires authentication).\n  - **Headers**: \n    - `Authorization: Bearer \u003cJWT_TOKEN\u003e`\n  - **Request Body**: (Similar to the `create` API)\n  - **Response**: Updated car details.\n\n- **DELETE /car/delete/{id}**  \n  Delete a specific car by its ID (requires authentication).\n  - **Headers**: \n    - `Authorization: Bearer \u003cJWT_TOKEN\u003e`\n  - **Response**: Success message or error.\n\n## Frontend Overview\n\nThe frontend is a React-based application that communicates with the backend to display and manage cars. Key pages include:\n\n- **Car List**: A public page where all cars are listed.\n- **Car Details**: View detailed information about a specific car.\n- **Add Car**: A form to add a new car (only accessible to authenticated users).\n- **User's Car List**: A page that shows only the cars created by the logged-in user.\n- **Edit Car**: Edit the details of a car created by the logged-in user.\n\n## Environment Variables\n\nYou will need the following environment variables for the backend:\n\n- **JWT_SECRET**: Secret key for signing JWT tokens.\n- **FIREBASE_BUCKET_URL**: Firebase storage URL for image uploads.\n- **MONGODB_URI**: MongoDB connection string.\n\nMake sure to configure these in your `.env` file.\n\n## Testing the APIs with Postman\n\nTo test the API endpoints, follow these steps:\n\n1. **Sign Up**: Send a `POST` request to `/api/signup` with the user data (name, email, password).\n2. **Sign In**: Send a `POST` request to `/api/signin` to get the JWT token.\n3. **Authenticated Requests**: Use the `Authorization: Bearer \u003cJWT_TOKEN\u003e` header for requests that require authentication (like creating, editing, or deleting cars).\n4. **Public Access**: Endpoints like `/car/car-list` and `/car/car-details/{id}` can be accessed without authentication.\n\n### Example Request: Add a New Car\n\n```bash\nPOST /car/create\nAuthorization: Bearer \u003cJWT_TOKEN\u003e\n{\n  \"title\": \"New Car\",\n  \"description\": \"This is a description of the new car.\",\n  \"images\": [\"https://image-url.com\"],\n  \"tags\": {\n    \"car_type\": \"Sedan\",\n    \"company\": \"Honda\",\n    \"dealer\": \"Authorized Dealer\"\n  }\n}\n```\n\n### Example Response:\n\n```json\n{\n  \"message\": \"Car added successfully\",\n  \"car\": {\n    \"_id\": \"12345\",\n    \"title\": \"New Car\",\n    \"description\": \"This is a description of the new car.\",\n    \"images\": [\"https://image-url.com\"],\n    \"tags\": {\n      \"car_type\": \"Sedan\",\n      \"company\": \"Honda\",\n      \"dealer\": \"Authorized Dealer\"\n    }\n  }\n}\n```\n\n## My Portfolio\n\nYou can view my portfolio here:  \n- [Md Shamim Akhter - Portfolio](https://shamim-portfolio-u1yp.onrender.com/)\n\nThe portfolio is fully responsive and showcases my skills, projects, and professional experience.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechjmi%2Fcar_list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechjmi%2Fcar_list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechjmi%2Fcar_list/lists"}