A comprehensive, production-ready donation tracking platform that ensures transparency in charitable giving, helps donors track their impact, and enables organizations to demonstrate their work.
- Track Donations: Complete history of all donations with detailed transaction records
- Visualize Impact: Interactive dashboards showing donation analytics and trends
- Support Campaigns: Contribute to specific fundraising campaigns with real-time progress tracking
- Transparency: View detailed impact reports from organizations
- Manage Campaigns: Create and manage fundraising campaigns with goals and deadlines
- Impact Reporting: Publish detailed impact reports with metrics and evidence
- Transparency Scores: Build trust through transparent reporting and verification
- Donor Management: Track donations and donor relationships
- Secure Authentication: JWT-based authentication with password hashing
- RESTful API: Comprehensive FastAPI backend with auto-generated documentation
- Modern Frontend: React with TypeScript, Tailwind CSS, and React Query
- Database: PostgreSQL with SQLAlchemy ORM
- Docker Support: Full containerization for easy deployment
- Testing: Comprehensive test coverage for backend and frontend
- CI/CD: Automated testing and deployment with GitHub Actions
- FastAPI: High-performance async Python web framework
- PostgreSQL: Reliable and scalable relational database
- SQLAlchemy: Powerful ORM for database operations
- Pydantic: Data validation and settings management
- JWT: Secure token-based authentication
- Pytest: Comprehensive testing framework
- React 18: Modern UI library with hooks
- TypeScript: Type-safe JavaScript
- Vite: Fast build tool and dev server
- Tailwind CSS: Utility-first CSS framework
- React Router: Client-side routing
- TanStack Query: Powerful data fetching and caching
- Recharts: Beautiful and customizable charts
- Axios: HTTP client for API requests
- Docker: Containerization
- Docker Compose: Multi-container orchestration
- GitHub Actions: CI/CD pipeline
- Nginx: Production web server
- Docker and Docker Compose
- Node.js 20+ (for local development)
- Python 3.11+ (for local development)
-
Clone the repository
git clone https://github.com/yourusername/open-donation-tracker.git cd open-donation-tracker -
Create environment file
cp .env.example .env # Edit .env with your configuration -
Start the application
docker-compose up -d
-
Initialize the database
make init-db # or: docker-compose exec backend python -m app.init_db -
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/api/docs
Admin User:
- Email: [email protected]
- Password: changeme123
Sample Donor:
- Email: [email protected]
- Password: password123
# Install dependencies
cd backend
pip install -r requirements.txt
# Run database migrations
alembic upgrade head
# Run development server
uvicorn app.main:app --reload
# Run tests
pytest -v --cov=app
# Run linter
flake8 app# Install dependencies
cd frontend
npm install
# Run development server
npm run dev
# Run tests
npm test
# Build for production
npm run build
# Run linter
npm run lintThe project includes a comprehensive Makefile for common tasks:
make help # Show all available commands
make install # Install all dependencies
make dev # Start development environment
make test # Run all tests
make lint # Lint all code
make logs # View container logs
make init-db # Initialize database
make clean # Clean up generated filesopen-donation-tracker/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── api/ # API endpoints
│ │ ├── core/ # Core functionality (config, security, db)
│ │ ├── models/ # SQLAlchemy models
│ │ ├── schemas/ # Pydantic schemas
│ │ ├── tests/ # Backend tests
│ │ ├── main.py # FastAPI application
│ │ └── init_db.py # Database initialization
│ ├── requirements.txt
│ └── Dockerfile
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ ├── contexts/ # React contexts
│ │ ├── hooks/ # Custom hooks
│ │ ├── types/ # TypeScript types
│ │ └── utils/ # Utility functions
│ ├── package.json
│ └── Dockerfile
├── .github/
│ └── workflows/ # GitHub Actions CI/CD
├── docker-compose.yml
├── Makefile
└── README.md
The API is fully documented using OpenAPI (Swagger). When the backend is running, visit:
- Interactive Docs: http://localhost:8000/api/docs
- ReDoc: http://localhost:8000/api/redoc
- OpenAPI JSON: http://localhost:8000/api/openapi.json
POST /api/auth/register- Register new userPOST /api/auth/login- Login and get tokensGET /api/auth/me- Get current user
GET /api/organizations- List all organizationsPOST /api/organizations- Create organizationGET /api/organizations/{id}- Get organization detailsGET /api/organizations/{id}/stats- Get organization statisticsPATCH /api/organizations/{id}- Update organizationDELETE /api/organizations/{id}- Delete organization (admin)
GET /api/campaigns- List all campaignsPOST /api/campaigns- Create campaignGET /api/campaigns/{id}- Get campaign detailsGET /api/campaigns/{id}/progress- Get campaign progressPATCH /api/campaigns/{id}- Update campaignDELETE /api/campaigns/{id}- Delete campaign
GET /api/donations- Get user's donationsGET /api/donations/all- Get all public donationsPOST /api/donations- Create donationGET /api/donations/stats- Get donation statisticsGET /api/donations/{id}- Get donation detailsPATCH /api/donations/{id}- Update donation
GET /api/impact-reports- List all impact reportsPOST /api/impact-reports- Create impact reportGET /api/impact-reports/{id}- Get report detailsPATCH /api/impact-reports/{id}- Update reportDELETE /api/impact-reports/{id}- Delete report
# Run all tests with coverage
cd backend
pytest -v --cov=app --cov-report=html
# Run specific test file
pytest app/tests/test_auth.py -v
# Run with coverage report
pytest --cov=app --cov-report=term-missing# Run tests
cd frontend
npm test
# Run tests with coverage
npm test -- --coverage
# Run tests in watch mode
npm test -- --watch-
Build production images
docker-compose -f docker-compose.prod.yml build
-
Start services
docker-compose -f docker-compose.prod.yml up -d
-
Set up SSL/TLS
- Use Let's Encrypt with Certbot
- Configure Nginx as reverse proxy
Create a .env file with the following variables:
# Database
POSTGRES_USER=donationuser
POSTGRES_PASSWORD=<strong-password>
POSTGRES_DB=donationtracker
DATABASE_URL=postgresql://user:pass@postgres:5432/db
# Backend
SECRET_KEY=<generate-random-32+-char-string>
JWT_SECRET_KEY=<generate-random-32+-char-string>
ENVIRONMENT=production
CORS_ORIGINS=https://yourdomain.com
# Frontend
VITE_API_URL=https://api.yourdomain.com- Change all default passwords
- Generate strong SECRET_KEY and JWT_SECRET_KEY
- Enable HTTPS/SSL
- Configure CORS properly
- Set up database backups
- Enable rate limiting
- Configure firewall rules
- Set up monitoring and logging
- Regular security updates
We welcome contributions! Please see CONTRIBUTING.md for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Check the
/docsfolder for detailed guides - Issues: Report bugs or request features on GitHub Issues
- Discussions: Join our community discussions on GitHub Discussions
- Payment gateway integration (Stripe, PayPal)
- Email notifications for donations and campaigns
- Mobile app (React Native)
- Advanced analytics and reporting
- Multi-language support
- Blockchain integration for donation tracking
- API rate limiting and throttling
- Advanced search and filtering
- Social media integration
- Automated tax receipt generation
- FastAPI for the excellent web framework
- React team for the amazing UI library
- All contributors who help improve this project
Made with ❤️ by the Open Donation Tracker team