Skip to content

A crowd funding platform that allows users donate to a cause or create a cause that other users can donate to.

Notifications You must be signed in to change notification settings

Simonvargas/Chimera

Repository files navigation

Chimeras

Chimera is a platform that allows people to raise money for events ranging from life events such as celebrations and graduations to challenging circumstances like accidents and illnesses.. It is a fullstack React App made with a Redux state manager and a backend using Python, Flask, SQL-Alchemy, and PostgresSQL and any other technologies.

Table of Contents
1. Features
2. Installation
3. Technical Implementation Details
4. Future Features
5. Contact
6. Special Thanks

Technologies

Features

Sign In and Sign Up

Sign Up Login

Feed Page

Chimera feed displays all projects and situations people need aid for. Discover and search for new projects to help build Feed Page

View Projects

Be able to view specific projects and its details Project Page

Add Projects

Add a new Projects to the database Add Project

Update & Delete Projects

On a specific project page, if you own the project, you are able to update your project details or delete the project. update a project

Support a Project

You can give to support to project by hitting the support button, specifying an amount and leaving an optional comment. Project

View your support

Donations and comments will populate in the backers & donations section in the project page Donations & Comments

Edit and Delete your support

In the backers & donations section, one can hit either the trash can icon to delete support or edit to update the comment posted. Donations & Comments

Installation

To build/run project locally, please follow these steps:

  1. Clone this repository
git clone https://github.com/Simonvargas/chimera.git
  1. Install Pipfile dependencies and create the virtual environment
pipenv install
  1. Install npm dependencies for the /react-app
cd react-app
npm install
  1. In the / root directory, create a .env based on the .env.example with proper settings

  2. Setup your PostgreSQL user, password and database and ensure it matches your .env file

  3. Before running any flask commands, confirm you are in the pipenv virtual env. If not, run the command:

pipenv shell
  1. In the root folder, create the database by running in the terminal:
flask db create
  1. In the root folder, migrate tables to the database by running in the terminal:
flask db migrate
  1. In the root folder, seed the database by running in the terminal:
flask seed all
  1. Start the flask backend in the / root directory
flask run
  1. Start the frontend in the /react-app directory
npm start

Technical Implementation Details

Update

Put is working by information being sent over through our store and updating our tables with the associated ID that has been sent over.

@project_routes.route('/edit/<int:id>', methods=['PUT'])
@login_required
def update_project(id):
    res = Project.query.get(id)
    form = ProjectForm()

    res.user_id = form.data['user_id']
    res.category_id = form.data['category_id']
    res.name = form.data['name']
    res.image = form.data['image']
    res.details = form.data['details']
    res.funding_goal = form.data['funding_goal']
    db.session.commit()
    return res.to_dict())

Posting Donations

The donation post also updates the project funding amount which will automatically update the progress bar to reflect the change in the added amount

 async function post(e){
        e.preventDefault()
        const updateAmount = Number(project.funding_raised) + Number(amount)
        const updateBackers = Number(project.backers + 1)
        const data = []
        if (amount < 1 || amount.toString()[0] == 0) {
          data.push('Your donation must be at least 1 one dollar')
        } 
        if (hostId === project.user_id) {
          data.push('You cannot donate to your own cause')
        }
        setErrors(data)
        
        if (data.length === 0) {
        await dispatch(backingActions.createBacking(hostId, id, amount, comment))
        await dispatch(projectActions.editProjectFunding(updateAmount, updateBackers, id))
        if (toggle) {
          setToggle(false)
        } else {
          setToggle(true)
        }
        setShowForm2(false)
      }
    }

Future Features

  1. Search - search through a search bar will be implemented in order to provide a more user friendly experience

  2. Second Feature - A like feature will be added to each project.

Contact

Simon Vargas

simonvargas01@gmail.com

Special Thanks

About

A crowd funding platform that allows users donate to a cause or create a cause that other users can donate to.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published