Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itxsaaad/mern-dev-test-code
https://github.com/itxsaaad/mern-dev-test-code
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/itxsaaad/mern-dev-test-code
- Owner: itxSaaad
- License: mit
- Created: 2024-07-12T09:50:41.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-12T12:06:20.000Z (4 months ago)
- Last Synced: 2024-07-13T11:58:33.747Z (4 months ago)
- Language: JavaScript
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Car Selling Service Application - Next | Express
> This project implements a simple car selling service application using Next.js for the frontend and Node.js with Express.js for the backend. Users can log in, submit their vehicle information, and upload pictures of their cars.
## Features
- User authentication with JWT token.
- Form submission for car details including model, price, phone number, city, and pictures.
- Error handling and input validation on both frontend and backend.
- Responsive design for mobile devices.
- Integration with MongoDB for data storage.## Technologies Used
- **Frontend**: Next.js, React, Tailwind CSS
- **Backend**: Node.js, Express.js, MongoDB
- **Authentication**: JWT (JSON Web Tokens)
- **File Upload**: Multer
- **HTTP Client**: Axios## Installation
1. Clone the repository and install the dependencies:
```bash
git clone https://github.com/itxSaaad/mern-dev-test-code.git
```2. Install the dependencies for both the frontend and backend:
```bash
cd mern-dev-test-code
npm install
```3. Create a `.env` file in the `root` directory and add the following environment variables:
```bash
NODE_ENV = "development"
PORT = 5000
MONGO_URI =
SALT=
JWT_SECRET=
```4. Create a `.env` file in the `client` directory and add the following environment variables:
```bash
NEXT_PUBLIC_API_URL=
```5. Run the development server from the root directory:
```bash
npm run dev
```# API Endpoints
- POST /api/users/login: User login endpoint.
- POST /api/users/add-car: Add car information endpoint.## License
This project is open source and available under the [MIT License](LICENSE).