Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Fireinthebellyy/ftb-web/llms.txt
Use this file to discover all available pages before exploring further.
Database Schema
FTB Hustle uses PostgreSQL with Drizzle ORM for type-safe database operations. The schema is defined inlib/schema.ts and includes tables for users, opportunities, mentorships, toolkits, and more.
Overview
The database schema is organized into the following categories:- Authentication & Users: Core user management and authentication
- Opportunities & Internships: Job and opportunity listings
- Mentorship: Mentor profiles and related data
- Toolkits & Monetization: Premium content and payment processing
- Community: User interactions, feedback, and content
- Tracking: Application tracking and calendar events
Enums
The schema defines several enums for type safety:Tables
Relationships Diagram
Key Features
Soft Deletes
Several tables implement soft deletes using thedeletedAt timestamp:
useropportunitiesinternships
Cascade Deletes
Most foreign key relationships useonDelete: "cascade" to automatically clean up related records when a parent record is deleted.
Array Fields
PostgreSQL array types are used for:- Tags and interests (
text[]) - Images (
text[]) - Upvoter IDs (
text[]) - Highlights and features (
text[])
Unique Constraints
Several tables enforce unique constraints:user.emailsession.tokentags.namecoupons.codewaitlist.emailnewsletterSubscribers.emailbookmarks (userId + opportunityId)userOnboardingProfiles (userId)userToolkitProgress (userId + contentItemId)trackerItems (userId + oppId)trackerEvents (userId + title + date)