Initial commit

This commit is contained in:
Peter Stockings
2026-02-22 22:53:22 +11:00
commit ccdb3d8dc7
26 changed files with 2238 additions and 0 deletions

29
app/__init__.py Normal file
View File

@@ -0,0 +1,29 @@
from flask import Flask
from app.config import Config
from app.db import init_db, close_db
def create_app():
app = Flask(__name__)
app.config.from_object(Config)
# Database lifecycle
init_db(app)
app.teardown_appcontext(close_db)
# Register blueprints
from app.routes.auth import bp as auth_bp
from app.routes.dashboard import bp as dashboard_bp
from app.routes.checkin import bp as checkin_bp
from app.routes.profile import bp as profile_bp
from app.routes.leaderboard import bp as leaderboard_bp
from app.routes.api import bp as api_bp
app.register_blueprint(auth_bp)
app.register_blueprint(dashboard_bp)
app.register_blueprint(checkin_bp)
app.register_blueprint(profile_bp)
app.register_blueprint(leaderboard_bp)
app.register_blueprint(api_bp)
return app