Impactree_API is a Django RESTful API using the Django Rest Framework. It serves as the back-end of the Impactree full-stack web application for tracking philanthropic donations and their impact. The system allows users to manage their donations, view various charities, and track their progress through a tree-based milestone system.
- Python
- Django
- Django Rest Framework
- SQLite
- Implement a RESTful API using Django and Django Rest Framework
- Design and implement a database schema for tracking donations and user progress
- Test-Driven Development through automated integration tests
- Integrate user authentication and authorization
- Apply best practices for data modeling and API design
- Implement proper data validation and error handling
- Clone the repository:
git clone <repository-url> cd <project-directory>
- Create a virtual environment:
pipenv shell
- Install the required packages:
pipenv install
- Set up & seed the database:
python3 manage.py migrate python3 manage.py makemigrations impactreeapi python3 manage.py migrate impactreeapi python3 manage.py loaddata users python3 manage.py loaddata tokens python3 manage.py loaddata milestones python3 manage.py loaddata impactplans python3 manage.py loaddata charitycategories python3 manage.py loaddata charities python3 manage.py loaddata impactplan_charities
- Run the development server:
python manage.py runserver
- Access the API at
http://localhost:8000
- register
- login
- users
- milestones
- charitycategories
- charities
- impactplans
The project includes the following main models:
- User (Django's built-in user model)
- Tokens (Django's built-in tokens)
- ImpactPlan
- CharityCategory
- Charity
- ImpactPlanCharity (many-to-many join table)
- Milestone
For a detailed view of the data structure, please refer to the ERD (Entity-Relationship Diagram) in the project documentation.
To run the test suite:
python manage.py test tests -v 1