https://github.com/spartan-71/hackradar-api
A universal hackathon API
https://github.com/spartan-71/hackradar-api
devfolio devpost dorahacks hackathon hackathon-api hackathon-tracker mlh unstop
Last synced: 4 months ago
JSON representation
A universal hackathon API
- Host: GitHub
- URL: https://github.com/spartan-71/hackradar-api
- Owner: Spartan-71
- License: apache-2.0
- Created: 2025-07-08T06:25:31.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-07-26T12:35:30.000Z (6 months ago)
- Last Synced: 2025-08-14T02:21:36.982Z (5 months ago)
- Topics: devfolio, devpost, dorahacks, hackathon, hackathon-api, hackathon-tracker, mlh, unstop
- Language: Python
- Homepage:
- Size: 54.7 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# HackRadar API
HackRadar is a FastAPI-based API that collects hackathon data from platforms like MLH, Devpost, and Devfolio, storing everything in a PostgreSQL database. It provides endpoints for upcoming hackathons and can be deployed easily with Docker.
## 🚀 Features
* Scrapers for multiple hackathon platforms.
* REST API built with FastAPI.
* Uses PostgreSQL as the primary database.
* Automated scraping using background tasks or scheduled jobs.
* Dockerized setup for easy deployment.
## ⚡ Quick Start (Docker)
Run the following commands to start everything with Docker and PostgreSQL:
```bash
docker compose build
docker compose up -d
```
Access API at: [http://localhost:8000/docs](http://localhost:8000/docs)
## 🛠 Local Setup
1. **Clone the repository**:
```bash
git clone https://github.com/yourusername/hackradar.git
cd hackradar
```
2. **Install dependencies (using uv)**:
```bash
uv pip install -e .
```
3. **Set up PostgreSQL**:
Ensure you have PostgreSQL running locally. Update the `.env` file with your database connection details.
4. **Initialize the database**:
```bash
python -m backend.init_db
```
5. **Run the scrapers to fetch initial data**:
```bash
python -m tasks.fetch_and_store
```
6. **Start the FastAPI server**:
```bash
uvicorn backend.main:app --reload
```
7. Open the interactive API docs at: [http://localhost:8000/docs](http://localhost:8000/docs)
## ⚙️ Environment Variables
Create a `.env` file in the root directory:
```
DATABASE_URL=postgresql://hackuser:hackpass@db:5432/hackradar
SCRAPE_ON_START=1
```
## 🤝 Contributing
Contributions are welcome! Please check the [Contributing Guide](CONTRIBUTING.md) before submitting pull requests.
---