Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
# 🧢 Freebie Tracker

Freebie Tracker is a database-backed Python application that helps developers keep track of the free items (swag) they receive from companies at hackathons or tech events.

## 📌 Learning Goals

- Create and run SQLAlchemy database migrations
- Define one-to-many and many-to-many relationships using SQLAlchemy
- Perform CRUD operations using SQLAlchemy
- Build Python class methods and instance methods interacting with a relational database

---

## 🧠 Domain Model

The app has three core models:

- **Dev**: A developer who receives freebies
- **Company**: A company giving away freebies
- **Freebie**: An item given by a company to a dev

### Relationships

- A **Dev** can receive many **Freebies**
- A **Company** can give many **Freebies**
- A **Freebie** belongs to one **Dev** and one **Company**
- A **Dev** can get freebies from many **Companies** (many-to-many via Freebies)

---

## 🗃️ Database Schema

You can view the full schema [here](FreebieTracker_schema.pdf).

| Table     | Columns                                 |
|-----------|------------------------------------------|
| devs      | id, name                                 |
| companies | id, name, founding_year                  |
| freebies  | id, item_name, value, dev_id (FK), company_id (FK) |

---

## ⚙️ Setup Instructions

### 1. Clone and Install Dependencies

```bash
git clone https://github.com/your-username/freebie-tracker.git
cd freebie-tracker
pipenv install
pipenv shell