Engineering Intelligence That Perceives, Reasons, and Acts
A modern, premium, fully dynamic company website with a powerful Admin Dashboard (CMS) that controls all website content.
src/
βββ assets/ # Static images, icons, brand assets
βββ components/
β βββ ui/ # shadcn/ui primitives
β βββ AIChatbot.tsx # Floating AI chatbot widget
β βββ AnnouncementBar.tsx # Dynamic top announcement bar
β βββ CTASection.tsx # Homepage call-to-action
β βββ DepartmentsSection.tsx # Service departments grid
β βββ Footer.tsx # Global footer
β βββ HeroSection.tsx # Dynamic hero (reads from CMS)
β βββ HowWeWorkSection.tsx # Process steps
β βββ Layout.tsx # Page wrapper (Navbar + Footer + Chatbot)
β βββ Navbar.tsx # Navigation bar
β βββ ServicePageTemplate.tsx# Reusable service page layout
β βββ SocialProofBar.tsx # Client logos marquee
β βββ TechStackSection.tsx # Technology grid
β βββ TestimonialsSection.tsx# Dynamic testimonials carousel
βββ hooks/ # Custom React hooks
βββ lib/
β βββ api.ts # β ALL backend API endpoints (central)
β βββ cms-store.ts # β CMS content stores (localStorage)
β βββ store.ts # Task/contact/chat/auth stores
β βββ utils.ts # Utility functions
βββ pages/
β βββ admin/
β β βββ AdminLayout.tsx # Admin shell with sidebar
β β βββ AdminLogin.tsx # Admin authentication
β β βββ AdminDashboard.tsx # Analytics overview
β β βββ AdminTasks.tsx # Task request management
β β βββ AdminMessages.tsx # Contact message management
β β βββ AdminPortfolio.tsx # β Portfolio CRUD
β β βββ AdminContent.tsx # β CMS content editor
β β βββ AdminNewsletter.tsx# Newsletter subscribers
β β βββ AdminSettings.tsx # Admin settings
β βββ services/ # Individual service pages
β βββ About.tsx
β βββ Contact.tsx
β βββ HowWeWork.tsx
β βββ Index.tsx # Homepage
β βββ Legal.tsx # Privacy/Terms/Cookies
β βββ Partnership.tsx
β βββ Portfolio.tsx # Dynamic portfolio grid
β βββ PortfolioDetail.tsx # β Project detail + case study
β βββ RequestTask.tsx # Project brief form
β βββ Technologies.tsx
β βββ Testimonials.tsx
βββ App.tsx # Routes & providers
All data is persisted in localStorage via two store files:
src/lib/store.tsβ Tasks, contacts, chat, auth, newslettersrc/lib/cms-store.tsβ Portfolio, case studies, testimonials, hero content, announcement bar, company info, SEO
Step 1: Update src/lib/api.ts
// Change this line:
const BASE_URL = "";
// To your backend:
const BASE_URL = "https://api.suntrix.com/v1";Step 2: Replace store calls with API calls
// Before (localStorage):
import { portfolioStore } from "@/lib/cms-store";
const projects = portfolioStore.getPublished();
// After (API):
import { apiRequest, ENDPOINTS } from "@/lib/api";
const { data: projects } = await apiRequest(ENDPOINTS.PORTFOLIO_LIST);Step 3: Add Cloudinary for assets
const CLOUDINARY_URL = "https://api.cloudinary.com/v1_1/YOUR_CLOUD/upload";| Endpoint | Method | Description |
|---|---|---|
/auth/login |
POST | Admin login |
/auth/me |
GET | Current user |
/portfolio |
GET/POST | List/Create projects |
/portfolio/:id |
PUT/DELETE | Update/Delete project |
/portfolio/slug/:slug |
GET | Get by slug |
/case-studies |
GET/POST | List/Create case studies |
/case-studies/slug/:slug |
GET | Get by slug |
/testimonials |
GET/POST | List/Create testimonials |
/contact |
POST | Submit contact form |
/task-requests |
GET/POST | List/Submit task briefs |
/chat |
POST | AI chatbot message |
/newsletter |
POST | Subscribe email |
/cms/hero |
GET/PUT | Hero section content |
/cms/announcement |
GET/PUT | Announcement bar |
/cms/company |
GET/PUT | Company info |
/cms/seo/:page |
GET/PUT | SEO settings per page |
/upload/image |
POST | Cloudinary image upload |
/upload/video |
POST | Cloudinary video upload |
{
"title": "string",
"slug": "string (unique)",
"category": "string",
"description": "string",
"shortDescription": "string",
"metric": "string",
"metricLabel": "string",
"coverImage": "string (Cloudinary URL)",
"images": ["string"],
"videoUrl": "string",
"tags": ["string"],
"tools": [{ "name": "string", "icon": "string" }],
"clientName": "string",
"industry": "string",
"highlights": ["string"],
"status": "published | draft",
"featured": "boolean",
"order": "number"
}{
"projectId": "ObjectId (ref: Portfolio)",
"slug": "string",
"challenge": "string",
"solution": "string",
"results": "string",
"galleryImages": ["string"],
"videoUrl": "string",
"toolsUsed": [{ "name": "string", "icon": "string" }],
"keyMetrics": [{ "label": "string", "value": "string", "description": "string" }],
"testimonial": { "quote": "string", "name": "string", "role": "string" },
"status": "published | draft"
}{
"quote": "string",
"name": "string",
"role": "string",
"company": "string",
"avatar": "string (Cloudinary URL)",
"rating": "number (1-5)",
"featured": "boolean",
"status": "published | draft"
}{
"name": "string",
"email": "string",
"company": "string",
"service": "string",
"budget": "string",
"timeline": "string",
"description": "string",
"status": "new | in_review | proposal_sent | in_progress | completed | cancelled"
}git clone <YOUR_GIT_URL>
cd <YOUR_PROJECT_NAME>
npm install
npm run devnpm run build
# Output in dist/ β deploy to Vercel, Netlify, or any static host- URL:
/admin/login - Default:
admin@suntrix.com/admin123
- Frontend: React 18 + TypeScript + Vite
- Styling: Tailwind CSS + shadcn/ui
- Animations: Framer Motion
- State: React Query + localStorage (swap to API)
- Planned Backend: Node.js + Express + MongoDB Atlas
- Planned Assets: Cloudinary CDN