Skip to content

khangnguyen213/Charitee_BE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHARITEE - Back-end

This is backend server for the website I made for my capstone project in the web-fullstack course. The website was developed with the purpose of helping charitable organizations collect donations from the community conveniently and quickly. At the same time, Charitee also helps users find ongoing charities and participate in charitable activities.

This repository only includes the back-end part of my website. You can visit the front-end part here.

Technologies I used include:

  • NodeJS
  • ExpressJS framework

I also used:

  • SendGrid (for sending verification email)
  • bcryptjs
  • jsonwebtoken
  • MongoDB (using Mongoose)
  • Paypal

The design of this website I gathered from the internet and not from my idea.

Installation

Use the package manager npm to install necessary dependencies.

npm install

Run the website in your local

npm start

Usage

ROUTES MAP

Path Method Param Description
/account/login post Body:
  • email
  • password
  • Login
/cause get Query:
  • [keyword]
  • [causeID]
  • Find all causes if no params
  • If keyword is defined, filter causes for matched results
  • If causeID is defined, get the detail information of that cause
/cause post Body:
  • title (Title of the cause you want to raise fund for)
  • description (Tell more about the cause)
  • goal (The target money you want to raise)
  • raised (The amount of money you raised up to now)
  • finishAt (Deadline for donation)
  • image (link for image to describe the cause)
  • Create a new cause for the website to raise fund
/cause put Body:
  • [description]
  • [goal]
  • [finishAt]
  • [image]
  • Update a cause already save in database
/cause/delete post - causeID
  • Delete a cause already save in database (change status into "inactive"
/account get Query:
  • [keyword]
  • [accountID]
  • Find all account if no params (only Admin or Master)
  • If keyword is defined, filter causes for matched results (only Admin or Master)
  • If accountID is defined, get the detail information of that account (only the owner of the matched account can see)
/account/[accountID] put Body:
  • fullname
  • phone
  • address
  • Update an account already created in the database
/account post Body:
  • email
  • password
  • fullname
  • phone
  • address
  • role
  • status
  • Create a new account
/account/delete post - accountID
  • Delete a account already save in database (change status into "inactive"
/donations get Query:
  • [keyword]
  • [accountID]
  • Find all causes if no params
  • If keyword is defined, filter donations/donators for matched results (only Admin and Master)
  • If accountID is defined, get the detail transaction history of that account (only owner of that account can see_

The data will be displayed in the demo link

This repository is BE only, you can see the source code of FE here.

Demo

Link: demo