A modern web application for discovering and searching Australian charities. Built with FastAPI, SQLModel, and TailwindCSS.
- 🔍 Advanced Search: Search charities by name, location, purpose, and beneficiary groups
- 📊 Statistics Dashboard: View sector-wide statistics and insights
- 🗺️ Location-based Discovery: Find charities by state and city
- 📱 Responsive Design: Beautiful, mobile-friendly interface
- ⚡ Fast Performance: Built with modern async Python and optimized queries
- Backend: FastAPI with SQLModel (SQLAlchemy)
- Database: SQLite with async support
- Frontend: HTML5, TailwindCSS, Vanilla JavaScript
- Data: Australian Charity and Not-for-profits Commission (ACNC) data
# Using pip
pip install -r requirements.txt
# Or using poetry
poetry installpython import_data.pyThis will:
- Create the SQLite database
- Import all charity data from the CSV file
- Set up the database schema
python main.pyThe application will be available at http://localhost:8000
GET /api/v1/charities/search- Search with query parametersPOST /api/v1/charities/search- Search with request body
GET /api/v1/charities/{charity_id}- Get specific charity
GET /api/v1/charities/stats/overview- Get sector statistics
GET /api/v1/charities/location/search- Search by location
GET /api/v1/charities/filters/options- Get available filter options
query: Search term for charity namestate: State filter (ACT, NSW, NT, QLD, SA, TAS, VIC, WA)charity_size: Size filter (Small, Medium, Large)purpose: Purpose filter (education, health, environment, etc.)beneficiary: Beneficiary group filter (children, aged, disabled, etc.)has_website: Filter by website availabilitylimit: Number of results per page (1-100)offset: Number of results to skip
The application uses data from the Australian Charity and Not-for-profits Commission (ACNC) with the following key fields:
- Basic Info: ABN, legal name, other names, website
- Location: Address, state, postcode, country
- Operations: States of operation, international operations
- Purpose: 20+ charitable purpose categories
- Beneficiaries: 30+ beneficiary group categories
- Organization: Size, responsible persons, financial year end
app/
├── models/ # SQLModel database models
├── controllers/ # Business logic layer
├── routes/ # API route definitions
├── templates/ # Jinja2 templates
├── utils/ # Utility functions
└── database.py # Database configuration
- Models: Add new models in
app/models/ - Controllers: Add business logic in
app/controllers/ - Routes: Add API endpoints in
app/routes/ - Templates: Add frontend pages in
app/templates/
The application uses SQLModel which automatically handles schema changes. For production, consider using Alembic for proper migration management.
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
RUN python import_data.py
EXPOSE 8000
CMD ["python", "main.py"]- Create
fly.tomlconfiguration - Deploy with
fly deploy
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
- Data provided by the Australian Charity and Not-for-profits Commission (ACNC)
- Built with FastAPI, SQLModel, and TailwindCSS