How khalilsoft45/sala7li-support works
1. This repository is a full-stack service platform, not just a brochure site. The README describes an Angular/Nebular stack, but the actual codebase is a React/TypeScript app built with Vite, TanStack Router, Bun, Drizzle, and SQLite.
2. The app is split into two main experiences: a public-facing marketing site and a logged-in operational dashboard. The public site lives in the home and layout components, while the dashboard is organized under src/routes/app.* with pages for advice, diagnosis, payments, tickets, users, profile, settings, and reclamations.
3. Routing is file-based through TanStack Router. src/routes/__root.tsx, src/routes/index.tsx, and the app.* route files define the navigation structure, and src/routeTree.gen.ts is the generated route map that ties the whole client-side navigation together.
4. The landing page is assembled from reusable section components in src/components/home plus shared layout pieces like Navbar and Footer. This makes the public site modular: hero, services, testimonials, FAQ, contact, and about are independent UI blocks rather than one monolithic page.
5. Core product interactions are surfaced through a small set of feature components: AuthModal, NewRequestDialog, RequestQueue, and Badges. These appear to support user onboarding, request submission, and operational triage for the support workflow.
6. There is a clear admin/editor boundary. src/components/admin/LandingPageEditor.tsx and ImageUpload.tsx suggest the marketing content is editable from inside the app, with uploads managed separately from the rest of the UI.
7. Backend logic is concentrated in src/server. requests.ts, settings.ts, and konnect.ts appear to encapsulate the business operations for request handling, app configuration, and payment-provider integration respectively. The presence of app.payments.tsx and app.payment-success.tsx indicates a payment flow wired into that server layer.
8. Persistence is SQLite-based, with schema and migrations managed by Drizzle. src/db/schema.ts, src/db/index.ts, the SQL migrations, and the checked-in sqlite.db file show that the database is a first-class part of the repository and likely used both for development and the app’s main data model.
9. File uploads are handled as a separate path. src/routes/api/upload.ts provides the API entry point, and public/uploads is the target for stored media, which keeps uploaded assets web-servable without routing them through the app runtime.
10. External integration points matter here. src/lib/supabase.ts indicates Supabase is used for some backend service such as auth, storage, or data access, while src/server/konnect.ts suggests a payments integration. These are the main non-local services shaping the architecture.
11. Shared application state and cross-cutting concerns live in src/lib: useApp.tsx for app context/state, defaultSettings.ts for baseline configuration, i18n.tsx for localization, and types.ts/utils.ts for common helpers. The src/components/ui folder is a shadcn-style component library used across the whole interface.
12. Deployment/tooling is oriented around a modern TypeScript web stack: Bun for package/runtime management, Vite for building, Drizzle for schema migrations, and wrangler.jsonc suggesting Cloudflare deployment support. components.json, ESLint, Prettier, and tsconfig.json round out the repo as a tightly controlled frontend-plus-server application.
Main entry points: app.advice.tsx App pages · routeTree.gen.ts Route tree · index.tsx Home page · app.index.tsx Dashboard home
Components 25
Public site
Marketing-facing pages and shared layout pieces.
- Home page · Public entry page for the marketing experience.
src/routes/index.tsx - Navbar/Footer · Shared chrome for the marketing site.
src/components/layout/Navbar.tsx - Home sections · Reusable hero, services, testimonials, FAQ, contact, and about sections.
src/components/home/HeroSection.tsx
Dashboard
Authenticated operational routes and product workflows.
- App shell · Shared authenticated frame around operational pages.
src/components/AppShell.tsx - Dashboard home · Main logged-in landing page.
src/routes/app.index.tsx - Ops workflow · Request intake, queueing, and status signaling components.
src/components/RequestQueue.tsx - Auth modal · Login or sign-up entry for user access.
src/components/AuthModal.tsx - New request · Dialog for creating support or service requests.
src/components/NewRequestDialog.tsx - Admin tools · Editor and upload path for managed landing-page content.
src/components/admin/LandingPageEditor.tsx - App pages · Operational routes for advice, diagnosis, payments, tickets, users, profile, settings, and reclamations.
src/routes/app.advice.tsx - Payments · Client payment pages, including success handling.
src/routes/app.payments.tsx
Server logic
Business operations and external integrations.
- Upload API · Server route for handling file uploads.
src/routes/api/upload.ts - Requests · Core request-handling business logic.
src/server/requests.ts - Settings · Application configuration and settings logic.
src/server/settings.ts - Konnect · External payment-provider integration.
src/server/konnect.ts - Supabase · Client for a managed backend service.
src/lib/supabase.ts
Data layer
SQLite persistence, schema, and migrations.
- Schema · Database models and table definitions.
src/db/schema.ts - DB access · Database connection and persistence entry point.
src/db/index.ts - Migrations · Versioned SQLite migration set.
src/db/migrations/0000_chief_prism.sql
Shared UI
Reusable application state, utilities, and component library.
- Router · Client-side navigation entry and route composition.
src/router.tsx - Route tree · Generated route map that wires the file-based routes together.
src/routeTree.gen.ts - Root route · Top-level route wrapper for the client app.
src/routes/__root.tsx - App state · Cross-cutting application context and shared state.
src/lib/useApp.tsx - i18n · Translation and locale support.
src/lib/i18n.tsx - UI kit · Reusable shadcn-style UI primitives used across the app.
src/components/ui/button.tsx
Connections 27
- Router → Route tree: loads · Router uses the generated route map.
- Route tree → Root route: includes · Generated tree binds the root route.
- Route tree → Home page: includes · Generated tree binds the landing page route.
- Route tree → App pages: includes · Generated tree binds dashboard routes.
- Root route → Navbar/Footer: wraps · Root route provides shared public chrome.
- Home page → Home sections: composes · Landing page is built from modular section components.
- Navbar/Footer → Home sections: surrounds · Navbar and footer frame the public sections.
- App pages → App shell: uses · Operational routes are rendered inside the app shell.
- App shell → Dashboard home: hosts · App shell contains the dashboard home.
- Dashboard home → Ops workflow: surfaces · Dashboard home exposes request and queue workflows.
- Ops workflow → Auth modal: opens · Auth entry is part of the user onboarding flow.
- Ops workflow → New request: creates · Requests are submitted through the new-request dialog.
- App pages → Payments: includes · Dedicated routes handle payment interactions.
- Payments → Konnect: calls · Payment pages depend on the payment-provider integration.
- Payments → Requests: updates · Payments connect back to operational request logic.
- Admin tools → Upload API: uploads · Content editing uses the upload endpoint for media assets.
- Upload API → Supabase: integrates · Upload handling may rely on external backend services.
- Requests → DB access: persists · Request operations read and write through the database layer.
- Settings → DB access: persists · Settings are stored through the database layer.
- DB access → Schema: uses · Database access is driven by the schema definitions.
- Schema → Migrations: evolves · Migrations maintain the schema over time.
- App state → i18n: coordinates · Shared app state works alongside localization.
- App state → UI kit: feeds · UI primitives are used throughout the application stateful screens.
- Home page → UI kit: renders with · Landing content uses the shared UI kit.
- Dashboard home → UI kit: renders with · Dashboard screens are built from shared UI primitives.
- App pages → App state: uses · Operational pages share common app context.
- App pages → Settings: reads · Dashboard pages depend on application settings.