How spacelord16/modelhub works
Project Type & Purpose
• This is a full-stack web application called “Deep Learning Model Hub” for sharing, discovering, and deploying deep learning models.
• Frontend: Next.js + TypeScript + Tailwind CSS.
• Backend: FastAPI + SQLAlchemy + Pydantic + Alembic migrations.
• Storage: SQLite (or PostgreSQL) for metadata; filesystem or cloud for model files.
• Auth: JWT-based.
File Structure Analysis
• Top-level:
• backend/ → FastAPI service
• frontend/ → Next.js app
• backend/app layers:
• api/v1 (routers/controllers: auth, users, models)
• services (business logic)
• models (ORM) & schemas (Pydantic DTOs)
• core (config, DB session, security)
• utils/storage.py (file upload/download)
• backend/alembic: DB migrations
• CLI scripts: create_admin.py, get_token.py, reset_admin.py
• frontend/src/app: route-based pages (login, register, dashboard, models, upload, token debug)
• frontend components & contexts: UI primitives, navigation, ProtectedRoute, AuthContext, ThemeToggle.
Insights from README
• Key user flows: authentication, model browsing, upload, download, metrics, rating.
• API docs via FastAPI Swagger.
• Planned deployment features.
Elements
– Blue rectangles for services/servers
– Green rectangles for code modules (frontend components, backend layers)
• Annotations for key protocols (HTTP(S), SQL, JWT).