Skip to content

admin_console_R

This is the documentation subtree for Someli-ai/admin_console_R, the React-based admin console used by Someli's internal staff.

Component summary

Component name admin_console_R
Purpose Internal staff UI: account management, personnel, prompts, affiliate marketing, customer service tooling
Tech stack Vite 5 + React 18 + TypeScript 5 + shadcn/ui + Tailwind 3 + Radix UI + react-router-dom 6 + @tanstack/react-query 5 + react-hook-form + Zod
Backend Someli-admin-api (via VITE_API_URL)
Routes 6 user-visible (Login + 5 protected pages)
Audit version 0.1
Last verified 2026-05-17

Index

Architecture & code organisation

Behaviour & integration

Cross-cutting concerns

Operations

Strategy

Audit trail

At a glance

  • The newest UI in the platform (started ~2025-Q4 based on commit dates). The only TypeScript / React / Vite codebase among the three frontends.
  • shadcn/ui design system: 50 components/ui/*.tsx primitives generated from the shadcn CLI (alert, dialog, card, button, table, form, sonner toast, etc.) — all wrapping Radix UI primitives.
  • 6 routes: /login, /accounts, /personnel, /affiliate-marketing, /customer-service, /my-profile (+ a commented-out /prompts)
  • Auth: hand-rolled AuthContext storing token in localStorage["auth_token"]. Sends Token: <encrypted> + Apptype: <base64> headers.
  • API layer: single src/services/api.ts (184 lines) wrapping fetch. ~25+ named methods (getAllOwnerList, searchUser, updateProfile, …).
  • State: React Context for auth; @tanstack/react-query for server state (declared, sparingly used at audit time); component-local useState for everything else.
  • No <a> element used for navigation — uses <Link> from react-router-dom and shadcn <Sidebar> patterns.
  • No tests, no CI.
  • No Dockerfile — see build-and-deploy.md.
  • lovable-tagger dev-only plugin suggests this codebase was bootstrapped from a Lovable.dev template.