InsightHub is a graduation-project platform for career guidance, assessment, and labor-market exploration. It combines a Flutter client, an ASP.NET Core backend, and a Python analytics service to support authentication, profile management, assessment workflows, jobs/news retrieval, and analytics dashboards.
Core capabilities include:
- User registration, login, OTP verification, and profile management
- Employee survey and non-employee career matching workflows
- HR interview quiz generation and result evaluation
- Jobs and news retrieval by selected tracks/categories
- Personalized home/explore analytics dashboards
- Scheduled ingestion and refresh workflows for market data
This section describes how to run the project locally after cloning it.
| Path | Purpose |
|---|---|
src/Backend Department |
ASP.NET Core Web API solution |
src/Analytics Department |
FastAPI analytics service and data-refresh pipeline |
src/Flutter Department |
Flutter client application |
| Tool | Recommended Version | Why it is needed |
|---|---|---|
| Git | Latest | Clone and update the repository |
| .NET SDK | 10.0 | Backend projects target net10.0 |
| SQL Server | 2019+ / Express / LocalDB | Primary database and Hangfire storage |
| Python | 3.10+ | Analytics API and refresh scripts |
| Flutter SDK | Stable release compatible with Dart ^3.9.2 |
Client build/runtime |
| ODBC Driver 17 for SQL Server | Supported version | Needed by the analytics pipeline when using SQL Server |
| Layer | Technologies |
|---|---|
| Frontend | Flutter, Dart, flutter_bloc, dio, flutter_dotenv, flutter_secure_storage, Syncfusion charts/maps/treemap |
| Backend | ASP.NET Core, EF Core, SQL Server, ASP.NET Identity, JWT, Hangfire, Swagger/OpenAPI |
| Analytics | FastAPI, Uvicorn, Pandas, NumPy, SQLAlchemy, python-dotenv, spaCy |
| External APIs | Adzuna Jobs API, NewsAPI, QuizAPI |
git clone https://github.com/InsightHubapp/InsightHub.git
cd InsightHubThe backend solution contains four projects:
InsightHub.APIInsightHub.ApplicationInsightHub.DomainInsightHub.Infrastructure
dotnet restore "src/Backend Department/InsightHub.sln"Backend configuration is loaded from:
src/Backend Department/InsightHub.API/appsettings.jsonsrc/Backend Department/InsightHub.API/appsettings.Development.json
Use appsettings.json for base/shared defaults and appsettings.Development.json for local development overrides.
Both files are in the correct runtime location for ASP.NET Core.
Recommended local values:
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=InsightHub;Trusted_Connection=True;TrustServerCertificate=True"
},
"Jwt": {
"Key": "replace-with-a-long-random-secret",
"Issuer": "InsightHub",
"Audience": "InsightHubUsers"
},
"Adzuna": {
"AppId": "your-adzuna-app-id",
"AppKey": "your-adzuna-app-key"
},
"VerifierEmail": {
"Email": "your-email@example.com",
"AppPassword": "your-app-password"
},
"NewsApi": {
"ApiKey": "your-newsapi-key"
},
"QuizAPI": {
"api_key": "your-quizapi-key"
},
"DataAnalysis": {
"BaseUrl": "http://127.0.0.1:8000"
}
}Practical usage:
- Keep shared defaults in
appsettings.json. - Put environment-specific local values in
appsettings.Development.jsonwhile running in Development mode.
Configuration sections used by the backend:
| Section | Used for |
|---|---|
ConnectionStrings:DefaultConnection |
EF Core, SQL Server, Hangfire storage |
Jwt |
Authentication token signing and validation |
Adzuna |
Jobs ingestion/query integration |
VerifierEmail |
OTP email sending |
NewsApi |
News ingestion/query integration |
QuizAPI |
Interview questions synchronization |
DataAnalysis |
Backend-to-analytics proxy base URL |
Apply the existing migrations:
dotnet ef database update --project "src/Backend Department/InsightHub.Infrastructure" --startup-project "src/Backend Department/InsightHub.API"If dotnet ef is not installed:
dotnet tool install --global dotnet-efdotnet run --project "src/Backend Department/InsightHub.API"Development URL from launchSettings.json:
http://localhost:5043
Important runtime behavior:
- Swagger UI is enabled in development.
- Hangfire server starts automatically.
- Seed routines run on startup.
DummyDataSeedermay create a substantial set of dummy market users on first run.- Rate limiting is enabled through
RateLimitPoliciesand applied to account and assessment-related flows.
The analytics section contains:
Analytics & Visualization: FastAPI dashboard APICleaning & Modeling: data acquisition, cleaning, caching, and refresh pipelineCleaning & Modeling/Lexicon References: domain classification and normalization references used by the cleaning pipeline
python -m venv .venv
.venv\Scripts\activatepip install -r "src/Analytics Department/requirements.txt"Create or update:
src/Analytics Department/.env
Use env example.txt as the reference.
Recommended local template:
ADZUNA_API_ID=your_adzuna_api_id
ADZUNA_APP_KEY=your_adzuna_app_key
ANALYST_HOST=127.0.0.1
CHARTS_PORT=8000
DB_TYPE=mssql+pyodbc
DB_DRIVER=ODBC Driver 17 for SQL Server
DB_USER=your_db_user
DB_PASSWORD=your_db_password
BACKEND_HOST=127.0.0.1
DB_PORT=1433
DB_NAME=InsightHubGenerate or refresh analytics data before starting the FastAPI service.
cd "src/Analytics Department/Cleaning & Modeling"
python update.pyThis step fetches data (using Adzuna credentials), updates raw/cache files, and generates:
src/Analytics Department/Shared Data/search_data.json
Pipeline dependencies:
- Adzuna credentials from
.env - Lexicon reference files in
Cleaning & Modeling/Lexicon References(for job-domain categorization and text normalization)
After pipeline completion, start FastAPI:
cd "src/Analytics Department/Analytics & Visualization"
python main.pyThe analytics service exposes:
POST /api/homePOST /api/explore
Operational notes:
- The analytics API reads
src/Analytics Department/Shared Data/search_data.jsonat startup. - If this file is not updated, dashboard responses may be empty or outdated.
- The data preparation pipeline uses Lexicon reference mappings during title normalization and field classification.
The Flutter app is now mostly organized around:
lib/corelib/feature
Legacy folders such as lib/views, lib/widget, lib/services, lib/model, and lib/cuibt still coexist with the newer structure, so the app remains in a transitional architecture.
cd "src/Flutter Department"
flutter pub getThe app loads its base URL from:
src/Flutter Department/.env
Use the provided example:
src/Flutter Department/.env.example
Example local value:
BASE_URL=http://localhost:5043/apiFor Android emulator:
BASE_URL=http://10.0.2.2:5043/apiFor physical devices, replace localhost with the host machine IP accessible from the device.
flutter runStart the system in this order:
- SQL Server
- Analytics refresh process
- Analytics API
- ASP.NET Core backend
- Flutter client
This order matters because:
- the backend depends on the database
- the backend proxies dashboard requests to the analytics API
- the Flutter app depends on the backend base URL
- the refresh service feeds the analytics data source used by the FastAPI process
| Issue | Likely cause | Action |
|---|---|---|
Backend fails with Jwt:Key is missing |
Missing or invalid config override | Verify appsettings.Development.json and Jwt settings |
| Backend fails to connect to SQL Server | Invalid DefaultConnection |
Check SQL Server instance name and permissions |
| OTP flow fails | VerifierEmail is missing or invalid |
Configure email and app password correctly |
| Interview question sync fails | QuizAPI:api_key missing |
Add a valid QuizAPI key |
| Analytics endpoints return empty responses | Analytics API unreachable or stale shared data | Start the FastAPI service and verify DataAnalysis:BaseUrl |
| Flutter cannot reach the backend | Wrong BASE_URL in .env |
Point it to your local backend URL |
| Jobs/news retrieval is empty | Missing Adzuna or NewsAPI credentials | Configure Adzuna and NewsApi settings |
| Analytics pipeline fails against SQL Server | Wrong DB settings or missing ODBC driver | Install ODBC Driver 17 and review analytics .env |
InsightHub is a multi-service system with a client app, a transactional backend, and a dedicated analytics service.
flowchart LR
U[User] --> F[Flutter Client]
F --> B[ASP.NET Core API]
B --> DB[(SQL Server)]
B --> A[FastAPI Analytics API]
B --> J[Adzuna API]
B --> N[NewsAPI]
B --> Q[QuizAPI]
A --> S[Shared Analytics Data]
A --> DB
The backend follows a layered design.
flowchart TD
API[InsightHub.API] --> APP[InsightHub.Application]
API --> INFRA[InsightHub.Infrastructure]
APP --> DOMAIN[InsightHub.Domain]
INFRA --> APP
INFRA --> DOMAIN
INFRA --> SQL[(SQL Server)]
| Layer | Responsibility |
|---|---|
InsightHub.API |
Controllers, middleware, authentication, rate limiting, startup configuration |
InsightHub.Application |
Contracts, interfaces, DTOs, and view models |
InsightHub.Domain |
Entities and enums |
InsightHub.Infrastructure |
EF Core persistence, external integrations, seeding, migrations, DI |
Key controllers:
| Controller | Responsibility |
|---|---|
AccountController |
Register, login, OTP, profile, logout, account deletion |
SurveyController |
Employee survey question retrieval and submission |
CareerQuizController |
Non-employee quiz retrieval, full-match submission, stored results |
InterviewQuizController |
HR/interview question retrieval and answer submission |
UserSubmission |
Determines employment-status-driven flow/navigation |
NewsController |
Track-based article retrieval |
JobOffersController |
Track-based jobs retrieval |
AnalysisProxyController |
Proxies home and explore analytics requests to FastAPI |
Primary API surface:
| Method | Endpoint | Purpose | Auth |
|---|---|---|---|
POST |
/api/Account/register |
Register account | Public |
POST |
/api/Account/login |
Login and get token | Public |
POST |
/api/Account/send-otp |
Request OTP | Public |
POST |
/api/Account/verify-otp |
Verify OTP | Public |
POST |
/api/Account/EmailExistance |
Check email existence | Public |
POST |
/api/Account/logout |
Logout | Authenticated |
GET |
/api/Account/profile |
Get profile | Authenticated |
PUT |
/api/Account/UpdateProfile |
Update profile | Authenticated |
DELETE |
/api/Account/DeleteAccount |
Delete account | Authenticated |
GET |
/api/Survey/questions |
Employee survey questions | Authenticated |
POST |
/api/Survey/submit |
Submit employee survey | Authenticated |
GET |
/api/CareerQuiz/questions |
Career quiz questions | Authenticated |
POST |
/api/CareerQuiz/full-match |
Submit career quiz answers and match | Authenticated |
GET |
/api/CareerQuiz/result |
Get stored career result | Authenticated |
POST |
/api/InterviewQuiz/Questions |
Get interview questions by track | Authenticated |
POST |
/api/InterviewQuiz/Submit |
Submit interview answers | Authenticated |
GET |
/api/UserSubmission/EmploymentStatus |
Get employment-status navigation state | Authenticated |
GET |
/api/AnalysisProxy/home |
Personalized dashboard home payload | Authenticated |
POST |
/api/AnalysisProxy/explore |
Filtered dashboard explore payload | Authenticated |
POST |
/api/News |
Get related news by categories/tracks | Public/API-level |
POST |
/api/JobsOffers |
Get related jobs by categories/tracks | Public/API-level |
Backend runtime orchestration:
AnalysisProxyControllerenriches analytics requests with user track context before forwarding to FastAPI.- Hangfire schedules recurring jobs for job sync, news ingestion, and interview-question sync.
- Startup seeding runs both structural seed data and market dummy data.
Key backend services:
| Service | Responsibility |
|---|---|
AccountService |
Identity, JWT issuance, OTP verification, profile updates |
SurveyService |
Employee assessment workflow |
CareerQuizService |
Match calculation and result persistence |
CareerQuizDecisionEngine |
Career match decision logic |
InterviewQuizService |
HR quiz retrieval and scoring |
InterviewQuestionsSyncService |
Pulls questions from QuizAPI |
UserSubmissionService |
Employment status and routing state |
NewsQueryService |
Reads stored news for API responses |
NewsIngestionService |
Refreshes and stores articles |
JobOffersQueryService |
Reads stored job offers for API responses |
JobSyncService |
Refreshes and stores job offers |
AdzunaService |
Outbound jobs API client |
NewsService |
Outbound news API client |
The analytics service is built around a reusable Analyzer and dynamic dashboard configuration.
| Module | Responsibility |
|---|---|
Analytics.py |
Analytical operations over the loaded dataset |
Configs.py |
Home/explore widget definitions and resolver wiring |
Routes.py |
Dynamic page route generation |
Services.py |
PageBuilder response assembly |
main.py |
FastAPI bootstrap and router registration |
Requesting.py |
Data acquisition client layer |
Handling.py |
Local file/data handling |
Caching.py |
Cache management |
Cleaning.py |
Transformation and cleaning logic |
update.py |
Long-running scheduled refresh process |
Frontend structure:
| Area | Responsibility |
|---|---|
lib/core |
Shared configuration, API services, storage, constants, utilities |
lib/feature/app_start |
Splash, onboarding, and welcome flows |
lib/feature/auth |
Registration, login, OTP, auth widgets and cubits |
lib/feature/home_and_explore |
Dashboard fetching, dynamic widgets, chart rendering |
lib/feature/menu_Services/career_and_hr |
Career quiz, HR quiz, navigation, match/result flows |
lib/feature/menu_Services/jop_and_news |
Jobs/news cubits, models, views, and widgets |
The app still references some legacy folders in active startup code, especially for profile/logout screens, which is important for maintenance and route tracing.
sequenceDiagram
participant User
participant Flutter
participant API
participant DB
User->>Flutter: Trigger UI action
Flutter->>API: HTTP request with optional JWT
API->>DB: Query or update domain data
DB-->>API: Result
API-->>Flutter: JSON response
Flutter-->>User: Updated UI state
sequenceDiagram
participant User
participant Flutter
participant API as ASP.NET Core API
participant DB as SQL Server
participant Analytics as FastAPI Analytics
User->>Flutter: Open home/explore screen
Flutter->>API: Request dashboard data
API->>DB: Resolve user and track context
API->>Analytics: POST /api/home or /api/explore
Analytics-->>API: Dashboard payload
API-->>Flutter: JSON payload
Flutter-->>User: Charts, cards, and filtered views
flowchart LR
EXT[External market data] --> REQ[Requesting.py]
REQ --> CLEAN[Cleaning.py]
CLEAN --> HANDLE[Handling.py]
HANDLE --> SHARED[Shared Data/search_data.json]
SHARED --> FASTAPI[Analytics API]
Primary persistence is implemented through AppDbContext.cs.
Key persisted entities:
- application users and identity records
- tracks and category labels
- survey questions, options, and responses
- career quiz results and per-track result rows
- interview questions and options
- job offers
- news articles
Important constraints and behaviors:
SurveyResponseis unique per(UserId, QuestionId).JobOffer.ExternalIdis unique.QuizResultcascades to relatedQuizResultTrackrows.- startup seeding initializes baseline reference data and dummy market data
The backend schedules recurring jobs through Hangfire:
- job synchronization: daily at 1:00
- news ingestion: every 12 hours
- interview question synchronization: weekly on Saturday
The analytics Python refresh service separately runs on its own time-window loop and updates the shared dataset consumed by the FastAPI analytics service.
InsightHub is implemented as three cooperating runtimes with clear boundaries:
- Flutter handles navigation, authentication state, secure token storage, and UI rendering.
- ASP.NET Core owns business workflows, persistence, authentication, background jobs, and API composition.
- FastAPI handles analytics computation and dashboard payload construction over a prepared market dataset.
This separation keeps transactional application logic and analytics processing decoupled.
| Decision | Reason |
|---|---|
| Layered backend architecture | Separates HTTP, contracts, domain logic, and infrastructure concerns |
| Dedicated analytics service | Keeps heavy data shaping out of the main transactional API |
| Backend analytics proxy | Allows user-context filtering before analytics responses are returned |
| Feature-oriented Flutter structure | Scales frontend code around workflows instead of file types alone |
| Centralized API client and secure storage | Simplifies auth-aware requests and token handling |
| Hangfire background scheduling | Supports data refresh without building a custom scheduler |
| Seeded local data | Makes development and demos usable without manual population |
- Flutter sends auth/profile requests via
ApiService. AccountControllerdelegates toAccountService.- Identity and JWT logic execute in the backend.
- Tokens are stored using secure storage in the client.
- Unauthorized responses trigger centralized client-side sign-out routing.
- The app requests employment status from
UserSubmission. - The result determines whether the user enters employee survey, non-employee quiz, stored result, or thank-you flow.
- Answers are submitted to the appropriate backend controller.
- Results are persisted and later reused for navigation or display.
- The Python refresh process collects and transforms market data.
- Cleaned output is written to
Shared Data/search_data.json. - FastAPI loads that file into a Pandas DataFrame on startup.
Analyzercomputes KPIs, aggregates, and chart-friendly payloads.PageBuildercomposes dashboard sections.- The backend proxies analytics responses to authenticated clients.
Patterns visible in the codebase:
- dependency injection in ASP.NET Core
- interface-driven service abstraction
- EF Core repository-through-DbContext style persistence
- builder/configuration-driven analytics responses
- Cubit/BLoC state management in Flutter
- centralized HTTP client handling on the client side
Strengths:
- analytics processing is isolated from the transactional backend
- external API integrations are encapsulated behind service classes
- recurring jobs reduce manual refresh work
- dashboard rendering is data-driven rather than fully hardcoded
- client auth/network behavior is centralized
Constraints:
- the Flutter app still mixes legacy and refactored modules
- configuration relies on local values for connection strings, JWT, and external API credentials
- analytics startup depends on loading a local shared JSON file into memory
- external integrations rely on multiple third-party credentials and service availability
The implementation suggests the main engineering challenges were:
- coordinating three runtimes across different languages and toolchains
- aligning backend DTOs, analytics payloads, and frontend rendering contracts
- routing users dynamically based on employment and assessment state
- keeping locally stored jobs/news/questions synchronized from external APIs
- evolving the Flutter codebase while maintaining backward compatibility with older modules
Overall, the repository reflects a realistic multi-service graduation project with a dedicated analytics subsystem and a frontend evolving toward a more maintainable feature-based architecture.