Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdrianislam0or1/lost-and-found-backend
This repository contains the backend code for the Lost & Found website, a community-driven platform designed to help individuals report and reclaim lost items.
https://github.com/mdrianislam0or1/lost-and-found-backend
expressjs nextjs nodejs prisma typescript vercel
Last synced: 10 days ago
JSON representation
This repository contains the backend code for the Lost & Found website, a community-driven platform designed to help individuals report and reclaim lost items.
- Host: GitHub
- URL: https://github.com/mdrianislam0or1/lost-and-found-backend
- Owner: mdrianislam0or1
- Created: 2024-06-02T12:08:11.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-06-05T08:56:42.000Z (6 months ago)
- Last Synced: 2024-06-06T09:35:52.430Z (5 months ago)
- Topics: expressjs, nextjs, nodejs, prisma, typescript, vercel
- Language: TypeScript
- Homepage: https://lost-and-found-backend-tau.vercel.app/
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Backend `README.md`
````markdown
# Lost & Found Backend## Overview
This repository contains the backend code for the Lost & Found website, a community-driven platform designed to help individuals report and reclaim lost items.
## Technologies Used
- Node.js
- Express.js
- TypeScript
- Prisma (ORM for database management)
- JWT (for authentication)
- API Integration with Frontend## Live Demo
[Backend Live Link](https://lost-and-found-backend-tau.vercel.app/)
## Getting Started
### Prerequisites
- Node.js (v14 or higher)
- npm (v6 or higher) or yarn (v1.22 or higher)
- PostgreSQL (or any other supported database)### Installation
1. Clone the repository:
```sh
git clone https://github.com/mdrianislam0or1/lost-and-found-backend.gitNavigate to the project directory:
sh
```cd lost-and-found-backend
Install dependencies:
sh
npm install
# or
yarn install
Set up environment variables:
Create a .env file in the root directory and add the following environment variables:
# .env
DATABASE_URL=\***\*\*\*\***
NODE_ENV=\***\*\*\*\***
PORT=\***\*\*\*\***
JWT_SECRET=\***\*\*\*\***
EXPIRES_IN=\***\*\*\*\***
REFRESH_TOKEN_SECRET=\***\*\*\*\***
REFRESH_TOKEN_EXPIRES_IN=\***\*\*\*\***
RESET_PASS_TOKEN=\***\*\*\*\***
RESET_PASS_TOKEN_EXPIRES_IN=\***\*\*\*\***
RESET_PASS_LINK="\***\*\*\*\***
EMAIL = \***\*\*\*\***
APP_PASS =\***\*\*\*\***Set up the database:
sh
npx prisma migrate dev
Running the Development Server
sh
npm run dev
# or
yarn dev
Building for Production
sh
npm run build
# or
yarn build
Running the Production Server
After building the project, you can start the production server with:
sh
npm start
# or
yarn start
Project Structure
src/ - Contains the source code.
controllers/ - Contains the request handlers.
middlewares/ - Contains middleware functions.
models/ - Contains Prisma schema and database models.
routes/ - Contains Express routes.
services/ - Contains business logic and helper functions.
utils/ - Contains utility functions.
index.ts - Entry point of the application.Features
User Authentication:
Secure login and registration with JWT-based authentication.Lost & Found Item Management:
APIs to submit lost and found items with details like category, description, date, and location.
Update and delete functionality for lost and found items.Profile Management:
APIs to manage user profile, claim requests, and reported items.Admin Dashboard:
User management and website activity monitoring features for administrators.Error Handling and Validation:
Comprehensive error handling and input validation for all endpoints.Contribution
Feel free to contribute to this project by opening issues and submitting pull requests.
LicenseThis project is licensed under the MIT License.
ContactFor any inquiries, please contact us at [email protected].
````