How tarun0648/skill-buddy-backend-og works
Project Type and Purpose
• This is the backend API of a full-stack career-development platform (“Skill Buddy”), built with Flask.
• It supports user authentication (email/password, OTP, GitHub/LinkedIn SSO), resume parsing, profile/portfolio analysis, community features, task tracking, and an AI-powered interview system (role-based & JD-based).
File Structure Analysis
• app.py – application entry point, Flask app initialization and blueprint registration.
• config/ – environment and Firebase settings.
• routes/ – Flask blueprints grouped by feature (auth, user, resume, profile, portfolio, community, tasks, interview, JD interviews).
• services/ – business logic layer interfacing with OpenAI, Firebase, email, OTP, GitHub/LinkedIn analysis, resume extraction, interview flows, task management.
• models/ – domain models mapping to Firebase documents (user, resume, interview, community posts, tasks).
• data/ – static JSON files for pre-defined interview questions.
• utils/ – helper functions (authentication, validation, encryption, file I/O).
• uploads/ – file storage for user resumes and videos.
• logs/ – application log files.
• requirements.txt, Procfile, runtime.txt – deployment/build scripts and dependencies.
README Insights
• Confirms layered MVC-style architecture: Frontend ↔ Flask API ↔ Services ↔ Firebase.
• External integrations: OpenAI GPT, Twilio SMS, Firebase Auth/Firestore, OAuth providers.
Components
a. Client Layer
– Web/Mobile Frontend (React/Vue or any SPA)
– HTTP(S) or WebSocket calls to API
b. API Layer (Flask App)
– app.py: Blueprint registration (auth_routes, resume_routes, interview_routes, etc.)
– Request handling, input validation, error handling
c. Services Layer
– InterviewService & JdInterviewService (OpenAI GPT integration via assistant_client)
– ResumeProcessingService & ResumeExtractor
– ProfileAnalyzer & PortfolioAnalyzer (LinkedIn/GitHub analyzers)
– AuthService (email/password, OTPService, SSOService)
– EmailService, FirebaseService, TaskManager
d. Data Layer
– Firestore (Firebase) as primary document database
– Storage (Firebase Storage or local uploads directory) for resumes and video recordings
– Static data: interview_questions.json, jd-predefined.json
e. External Services
– OpenAI API (GPT question generation)
– Twilio/SMS provider (OTP)
– OAuth Providers (GitHub, LinkedIn)
– Email provider (SMTP/SendGrid)
f. Infrastructure
– Logging (logs/app.log)
– Deployment targets (Heroku, GCP App Engine, Docker, AWS Lambda)
– Background job execution (TaskManager scripts or scheduler)
Relationships & Data Flow
• Frontend sends HTTP requests → Flask API (app.py)
• Flask routes invoke Services → Services read/write to Firestore or file storage
• Interview flows call assistant_client → OpenAI → return questions to Services → API → Frontend
• OTPService ↔ Twilio SMS
• SSOService ↔ GitHub/LinkedIn OAuth endpoints
• All database operations via FirebaseService → Firestore
• TaskManager handles asynchronous tasks (migrations, background processing)
Architectural Patterns & Design Principles
• Modular monolith with clear layer separation: Controllers (routes) → Services → Data access
• Blueprint pattern in Flask for feature isolation
• Dependency injection via config/settings and environment variables
• Single responsibility: each service handles one domain
• External API wrappers (assistant_client, firebase_service) abstract third-party calls
Technology Stack Highlights
• Python 3.10+, Flask 2.3+
• Firestore (Firebase) for NoSQL data, Firebase Auth for user identity
• OpenAI GPT for AI interview features
• Twilio for SMS OTP
• GitHub and LinkedIn OAuth
• Local file storage for uploads (or Firebase Storage in production)
• Gunicorn or Docker for production hosting