Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codebatine/project-donation-app
MongoDB Hackathon.
https://github.com/codebatine/project-donation-app
donation-app donation-website hackathon javascript mongodb
Last synced: about 7 hours ago
JSON representation
MongoDB Hackathon.
- Host: GitHub
- URL: https://github.com/codebatine/project-donation-app
- Owner: codebatine
- Created: 2024-10-04T21:26:26.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-11-03T16:48:11.000Z (16 days ago)
- Last Synced: 2024-11-03T17:28:30.295Z (16 days ago)
- Topics: donation-app, donation-website, hackathon, javascript, mongodb
- Language: JavaScript
- Homepage:
- Size: 220 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project Donation App
This is a donation platform built for a hackathon. The app allows users to sign up, log in, create donation projects, and support projects by making donations. MongoDB is used for data storage, and Langchain is integrated for basic chatbot functionalities.
## Features
- **User Authentication:** Signup and login with hashed passwords
- **Project Creation:** Users can create donation projects and set donation goals
- **Donation Tracking:** Shows donation progress towards each project's goal
- **Chat Assistant:** Basic chatbot assistance powered by Langchain (testing mode)## Technologies Used
- **Frontend:** React, Sass
- **Backend:** Node.js, Express
- **Database:** MongoDB (MongoDB Atlas recommended for deployment)
- **AI Integration:** Langchain## Getting Started
### Prerequisites
- Node.js and npm installed
- MongoDB (either local or MongoDB Atlas for cloud hosting)
- Langchain API key### Setup Instructions
1. **Clone the repository:**
```bash
git clone https://github.com/codebatine/Project-Donation-App.git
```For both backend and frontend, run the following commands from their respective directories:
# In the backend folder
```bash
cd backend
npm install
```# In the frontend folder
```bash
cd frontend
npm install
```## Set up Environment Variables:
In the backend folder, create a .env file and add the following environment variables:
```bash
MONGO_URI=
JWT_SECRET=
LANGCHAIN_TRACING_V2=true
LANGCHAIN_ENDPOINT=https://api.smith.langchain.com
LANGCHAIN_API_KEY=
LANGCHAIN_PROJECT=donation-app
```## Start the Servers:
First, make sure MongoDB is running, either locally or on MongoDB Atlas.
Start the backend server:
```bash
cd backend
npm start
```## Start the frontend server:
```bash
cd frontend
node server.js
```## Access the Application:
The app should now be accessible at http://localhost:3000, and the backend API will be running on http://localhost:5000.
## API Endpoints
### Authentication
POST /api/auth/signup - Register a new user
POST /api/auth/login - Log in as an existing user
### Projects
POST /api/projects - Create a new donation project
GET /api/projects - Get all projects
PUT /api/projects/:id/donate - Make a donation to a project
### Chatbot
POST /api/chatbot - Interact with the Langchain-powered chatbot