API Documentation
Technical reference for Ahoy Indie Media platform endpoints and structure
Documentation Sections
System architecture, API endpoints, data models, and implementation details
Route Definitions
Flask application routes with HTTP methods, templates, and functionality
Main Application Routes
User Pages
Utility Pages
Individual Content Pages
Individual artist pages with detailed information and content
Legal Pages
Privacy policy and data handling information
Security practices and user safety information
Terms of service and usage guidelines
API Endpoints
Content APIs
Retrieve all music tracks with metadata
Retrieve all show/video content
Retrieve artist directory
Get specific artist profile data
Curated now playing feed with randomized content
Generate seeded daily playlist based on date
User Management APIs
User authentication and session creation
User registration and account creation
Get user profile information
Update user profile information
Save & Like APIs
Save content (works for guests and users)
Remove saved content
Get saved content by type
Like content
Playlist Management APIs
Get all playlists or create new playlist
Manage specific playlist
Add content to playlist
Utility APIs
Universal search across all content
Weather information for user location
Daily agenda and events
Data Structure
Static Content Data
Music tracks database with metadata
id
- Unique track identifier
title
- Track title
artist
- Artist name
album
- Album name (optional)
genre
- Music genre
duration
- Track duration
cover_art
- Album cover URL
preview_url
- 30s preview URL
added_date
- Date added to library
Shows and video content database
id
- Unique show identifier
title
- Show title
host
- Host/creator name
type
- Content type (episode, clip,
music_video, broadcast)
description
- Show description
thumbnail
- Video thumbnail URL
duration
- Video duration
publish_date
- Publication date
Artist directory and profiles
id
- Unique artist identifier
name
- Artist name
type
- Artist type (musician, host,
producer)
genres
- Array of genres
description
- Artist bio
image
- Artist profile image
social_links
- Social media links
location
- Geographic location
User Data
User accounts and profiles
username
- Unique username
email
- User email
password_hash
- Hashed password
display_name
- Display name
avatar
- Profile avatar URL
saved_content
- User's saved items
playlists
- User's playlists
liked_content
- Liked items
created_date
- Account creation
date
User activity tracking and analytics
user_id
- User identifier
activity_type
- Type of activity
content_id
- Related content ID
timestamp
- Activity timestamp
metadata
- Additional activity data
Frontend Architecture
JavaScript Modules
Main application JavaScript with global functions
Media player functionality for audio and video
Playlist creation and management
Unified hero carousel system for subpages
CSS Architecture
Main stylesheet with base styles and layout
Component-specific styles and UI elements
Template System
The application uses Jinja2 templating with Flask, featuring:
- base.html - Main template with navigation and layout
- Page templates - Individual page layouts extending base
- Component reuse - Shared UI components across pages
- Alpine.js integration - Reactive components and interactions
Key Features
Music Discovery
- Curated Now Playing feed
- Daily algorithmic playlists
- Genre-based filtering
- Artist recommendations
Video Content
- Live performance videos
- Music video library
- Exclusive content
- Category-based browsing
Artist Profiles
- Detailed artist information
- Discography and shows
- Social media integration
- Follow functionality
Playlist Management
- Create custom playlists
- Save favorite content
- Cross-platform sync
- Share with others
Universal Search
- Search across all content
- Filter by type
- Real-time results
- Search history
Mobile Experience
- Responsive design
- Touch-optimized controls
- Seamless navigation
- Offline functionality
User Management
- Guest mode support
- User accounts
- Data migration
- Privacy controls
Data Persistence
- Session-based storage
- User data sync
- Backup & restore
- Cross-device access
Technology Stack
Backend
Frontend
Deployment
Development
Architecture Pattern
The application follows a Model-View-Controller (MVC) pattern:
- Model - JSON data files and user management system
- View - Jinja2 templates with Alpine.js components
- Controller - Flask route handlers and API endpoints
Development Information
Project Structure
Getting Started
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
- Access at
http://localhost:5000