A Flask-based web application for managing student gigs and communications at Swarthmore College.
swatworks/
├── app/ # Main application package
│ ├── __init__.py # Application factory and extensions
│ ├── auth/ # Authentication module
│ │ ├── __init__.py # Auth blueprint initialization
│ │ ├── routes.py # Auth routes (login, register, etc.)
│ │ ├── models.py # User model definition
│ │ ├── forms.py # Login and registration forms
│ │ └── templates/auth/ # Auth-specific templates
│ │ ├── login.html # Login page template
│ │ └── register.html # Registration page template
│ ├── gigs/ # Gigs module
│ │ ├── __init__.py # Gigs blueprint initialization
│ │ ├── routes.py # Gig-related routes
│ │ ├── models.py # Gig model definition
│ │ ├── forms.py # Gig creation/editing forms
│ │ └── templates/gigs/ # Gig-specific templates
│ │ ├── create_gig.html # Gig creation page
│ │ └── list_gigs.html # Gigs listing page
│ ├── messages/ # Messaging module
│ │ ├── __init__.py # Messages blueprint initialization
│ │ ├── routes.py # Message-related routes
│ │ ├── models.py # Message model definition
│ │ ├── forms.py # Message composition forms
│ │ └── templates/messages/ # Message-specific templates
│ │ ├── inbox.html # Message inbox page
│ │ └── message.html # Individual message view
│ ├── templates/ # Global templates
│ │ └── base.html # Base template for all pages
│ ├── static/ # Static files
│ │ ├── css/ # CSS stylesheets
│ │ │ └── styles.css # Main stylesheet
│ │ └── js/ # JavaScript files
│ │ └── scripts.js # Main JavaScript file
│ ├── models.py # Global models
│ ├── forms.py # Global forms
│ └── config.py # App-specific configuration
├── migrations/ # Database migrations directory
├── tests/ # Test suite
│ ├── test_auth.py # Authentication tests
│ ├── test_gigs.py # Gigs functionality tests
│ └── test_messages.py # Messaging tests
├── venv/ # Virtual environment (not commit, in gitingnor)
├── .env # Environment variables
├── config.py # Configuration settings
├── requirements.txt # Project dependencies
└── run.py # Application entry point
.env: Environment variables for developmentconfig.py: Application configuration settingsrequirements.txt: Python package dependencies
run.py: Application entry pointapp/__init__.py: Application factory pattern implementation
Each module (auth, gigs, messages) follows a similar structure:
__init__.py: Blueprint initializationroutes.py: View functions and endpointsmodels.py: Database modelsforms.py: Form classestemplates/: Module-specific templates
base.html: Base template with common layout- Module-specific templates inherit from base.html
styles.css: Main CSS stylesheetscripts.js: Main JavaScript file
- Separate test files for each module
- Located in the
tests/directory