Skip to content

MuhammadTahirSundhu/SunTriX-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SunTriX β€” AI Engineering Agency Website

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.


πŸ—οΈ Project Structure

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

πŸ”Œ Backend Integration Guide

Current State: localStorage

All data is persisted in localStorage via two store files:

  • src/lib/store.ts β€” Tasks, contacts, chat, auth, newsletter
  • src/lib/cms-store.ts β€” Portfolio, case studies, testimonials, hero content, announcement bar, company info, SEO

Migration to Node.js + MongoDB

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";

All API Endpoints (defined in src/lib/api.ts)

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

πŸ“Š Required Database Schemas (MongoDB)

Portfolio Projects

{
  "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"
}

Case Studies

{
  "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"
}

Testimonials

{
  "quote": "string",
  "name": "string",
  "role": "string",
  "company": "string",
  "avatar": "string (Cloudinary URL)",
  "rating": "number (1-5)",
  "featured": "boolean",
  "status": "published | draft"
}

Task Requests

{
  "name": "string",
  "email": "string",
  "company": "string",
  "service": "string",
  "budget": "string",
  "timeline": "string",
  "description": "string",
  "status": "new | in_review | proposal_sent | in_progress | completed | cancelled"
}

πŸš€ Deployment

Development

git clone <YOUR_GIT_URL>
cd <YOUR_PROJECT_NAME>
npm install
npm run dev

Production Build

npm run build
# Output in dist/ β€” deploy to Vercel, Netlify, or any static host

Admin Access

  • URL: /admin/login
  • Default: admin@suntrix.com / admin123

🎨 Tech Stack

  • 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

About

SunTriX is a premium AI engineering agency platform built with React, TypeScript, and Tailwind CSS, featuring a fully dynamic CMS, AI chatbot integration, portfolio management, and a scalable admin dashboard. Designed for modern AI businesses, it supports seamless migration to Node.js, MongoDB, and Cloudinary-powered infrastructure.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages