{"id":50903780,"url":"https://github.com/hatimhtm/china-global-study","last_synced_at":"2026-06-16T05:05:28.912Z","repository":{"id":357009729,"uuid":"1188889040","full_name":"hatimhtm/china-global-study","owner":"hatimhtm","description":"Internal student-placement CRM for China Global Study (parent agency placing Moroccan students into Chinese universities). Next.js 16 + Supabase + 8-stage drag-and-drop kanban + 5 themes. Freelance build, shipped to production.","archived":false,"fork":false,"pushed_at":"2026-05-10T21:51:40.000Z","size":159,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-10T23:32:05.529Z","etag":null,"topics":["client-work","crm","dashboard","framer-motion","freelance","kanban","nextjs","react","supabase","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"https://dashboard-omega-blue-41.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hatimhtm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-22T18:07:37.000Z","updated_at":"2026-05-10T21:51:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hatimhtm/china-global-study","commit_stats":null,"previous_names":["hatimhtm/china-global-study"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/hatimhtm/china-global-study","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatimhtm%2Fchina-global-study","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatimhtm%2Fchina-global-study/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatimhtm%2Fchina-global-study/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatimhtm%2Fchina-global-study/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hatimhtm","download_url":"https://codeload.github.com/hatimhtm/china-global-study/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hatimhtm%2Fchina-global-study/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34391761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client-work","crm","dashboard","framer-motion","freelance","kanban","nextjs","react","supabase","tailwindcss","typescript"],"created_at":"2026-06-16T05:05:28.242Z","updated_at":"2026-06-16T05:05:28.906Z","avatar_url":"https://github.com/hatimhtm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/hero-banner-dark.svg\" /\u003e\n    \u003cimg src=\"assets/hero-banner.svg\" alt=\"China Global Study\" width=\"100%\" /\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/hatimhtm/china-global-study/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/hatimhtm/china-global-study/ci.yml?branch=main\u0026style=for-the-badge\u0026label=CI\u0026labelColor=1A1A1A\u0026color=CCFF00\" alt=\"CI\" /\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/CLIENT_WORK-SHIPPED-1A1A1A?style=for-the-badge\u0026labelColor=1A1A1A\" alt=\"Client work — shipped\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Next.js-16-1A1A1A?style=for-the-badge\u0026logo=nextdotjs\u0026logoColor=CCFF00\" alt=\"Next.js 16\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/React-19-1A1A1A?style=for-the-badge\u0026logo=react\u0026logoColor=CCFF00\" alt=\"React 19\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Supabase-1A1A1A?style=for-the-badge\u0026logo=supabase\u0026logoColor=CCFF00\" alt=\"Supabase\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Tailwind-4-1A1A1A?style=for-the-badge\u0026logo=tailwindcss\u0026logoColor=CCFF00\" alt=\"Tailwind 4\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eInternal student-placement CRM for \u003cstrong\u003eChina Global Study\u003c/strong\u003e — the parent agency placing Moroccan and North-African students into Chinese universities. ~4,000 LOC of Next.js 16 (App Router) on Supabase, with an 8-stage drag-and-drop kanban, document tracking, payment-status state machine, and five swappable themes. Built for them on a freelance engagement, shipped to production, in daily use.\u003c/em\u003e\n\u003c/p\u003e\n\n---\n\n### `/// THE BRIEF`\n\nCGS runs a student-placement business by hand — universities tracked in spreadsheets, applicants in WhatsApp threads, payment status in heads. The brief: replace all of that with one dashboard the agency could actually open every day. Specifically\n\n1. **One pipeline view, end to end** — every applicant lives in one of eight stages from `Inquiry` to `Enrolled`, drag-and-drop between columns, no spreadsheet exports.\n2. **Money where it belongs** — each application tracks `amount_paid_cny` against `service_fee_cny` with auto-computed `Paid` / `Partial` / `Unpaid` status. CNY ↔ MAD conversion baked into program totals.\n3. **Five themes, one dashboard** — the agency's principal works late, so the UI ships with Obsidian Dark, Warm Cream, Sapphire, Jade, and Vivid Orange themes. Pick one, it sticks.\n4. **Document-state at a glance** — every application has its own document set (passport · transcript · diploma · medical · visa · admission letter · …) cycling through `Pending → Received → Verified → Expired` with a single tap.\n\n---\n\n### `/// HIGHLIGHTS`\n\n| | |\n|---|---|\n| **8-stage kanban pipeline** | `@hello-pangea/dnd` for physics-y drag between status columns; optimistic UI, status updates write back to Supabase live |\n| **Supabase as the entire backend** | Seven tables (universities · programs · applicants · applications · documents · tasks · cities), referential cascades, status enums enforced at the DB layer |\n| **Payment-status state machine** | `amount_paid_cny` vs `service_fee_cny` auto-derives `Unpaid` / `Partial` / `Paid` — plus a force-paid override for discounts and special offers |\n| **Five fully-themed UIs** | CSS-variable theming, theme persists to localStorage, every component reads `var(--bg-primary)` etc. — status badges use `color-mix()` so they adapt per theme without hard-coded colors |\n| **Skeleton loading + unified empty states** | `\u003cSkeleton/\u003e`, `\u003cKanbanSkeleton/\u003e`, `\u003cTableSkeleton/\u003e`, `\u003cGridSkeleton/\u003e` replace spinners; one `\u003cEmptyState/\u003e` component with icon + title + description + action used across every list view |\n| **Refined motion** | Modal/Drawer use viralos's signature `cubic-bezier(0.16, 1, 0.3, 1)` ease; ESC-to-close on both; `active:scale(0.98)` press feedback on buttons; cards lift on hover |\n| **Next.js 16 App Router** | Section layouts, server components for data-heavy pages, client islands for the kanban and modals |\n| **Tutorial overlay** | First-run guided tour with anchored tooltips so agency staff can onboard themselves |\n| **Currency-aware programs** | Programs store fees in CNY and auto-compute MAD at `DEFAULT_MAD_RATE = 1.38` — tunable in [`src/lib/constants.ts`](src/lib/constants.ts) |\n| **Env-gated soft auth** | Landing page accepts a phrase from `NEXT_PUBLIC_AUTH_PHRASE`; pass-through to dashboard via localStorage. Not real auth — Supabase RLS does the actual gating |\n\n---\n\n### `/// PAGES`\n\n- **`/`** — auth gate (theme-aware brand, phrase entry)\n- **`/dashboard`** — overview · stats · featured programs · recent activity\n- **`/dashboard/pipeline`** — the kanban: every applicant, every stage, drag to move\n- **`/dashboard/universities`** — partner-institutions registry with featured flag and scholarship %\n- **`/dashboard/cities`** — Chinese-city guides (climate · cost-of-living · essential-apps · accommodation)\n- **`/dashboard/documents`** — per-application document tracker with cycling status pills\n- **`/dashboard/tasks`** — pre-departure · arrival · documentation · general task buckets\n- **`/dashboard/settings`** — agency profile · theme picker · currency rate · tutorial replay\n\n---\n\n### `/// STACK`\n\n```\nNext.js 16    · React 19 · TypeScript 5\nTailwind 4    · framer-motion 12 · lucide-react\nSupabase      · @hello-pangea/dnd (kanban DnD)\nVercel        · App Router · server + client components\n```\n\n---\n\n### `/// PROJECT LAYOUT`\n\n```\nsrc/\n├── app/\n│   ├── layout.tsx                root layout, theme provider\n│   ├── page.tsx                  auth gate (env-driven phrase)\n│   ├── globals.css               theme CSS variables + status-badge utilities (color-mix)\n│   └── dashboard/\n│       ├── layout.tsx            sidebar + navbar wrapper\n│       ├── page.tsx              overview, stats, featured programs\n│       ├── pipeline/page.tsx     8-stage kanban (dnd) + financial drawer\n│       ├── universities/page.tsx\n│       ├── cities/page.tsx\n│       ├── documents/page.tsx\n│       ├── tasks/page.tsx\n│       └── settings/page.tsx     agency profile + theme picker\n├── components/\n│   ├── layout/{Navbar,Sidebar}.tsx\n│   ├── ui/{Modal,SlideDrawer,Tutorial,EmptyState,Skeleton}.tsx\n│   └── dashboard/NewEntryModal.tsx\n├── lib/\n│   ├── supabase.ts               anon-key client\n│   ├── themes.ts                 5 themes × ~25 CSS vars\n│   └── constants.ts              enums + tutorial steps + MAD rate\n└── types/\n    └── index.ts                  domain types (University · Program · …)\n\nsupabase-schema.sql               run this in the SQL editor on a fresh project\n```\n\n---\n\n### `/// LOCAL DEV`\n\n```bash\n# 1 — Spin up a Supabase project, paste supabase-schema.sql into SQL Editor, run it.\n# 2 — Copy env template and fill in your project URL + anon key + auth phrase:\ncp .env.example .env.local\n# 3 — Install \u0026 run:\nnpm install\nnpm run dev      # http://localhost:3000\nnpm run build    # next build (production bundle)\nnpm run lint     # eslint\n```\n\n---\n\n### `/// STATUS`\n\n🟢 **Live, in production, in daily use by the agency.** Engagement complete; this repo is the public archive of the build.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://hatimelhassak.is-a.dev\"\u003e\u003cimg src=\"https://img.shields.io/badge/PORTFOLIO-1A1A1A?style=for-the-badge\u0026logo=vercel\u0026logoColor=CCFF00\" alt=\"Portfolio\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://cal.com/hatimelhassak/engineering-discovery\"\u003e\u003cimg src=\"https://img.shields.io/badge/BOOK_A_CALL-CCFF00?style=for-the-badge\u0026logo=googlecalendar\u0026logoColor=1A1A1A\" alt=\"Book a call\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.linkedin.com/in/hatim-elhassak/\"\u003e\u003cimg src=\"https://img.shields.io/badge/LINKEDIN-1A1A1A?style=for-the-badge\u0026logo=linkedin\u0026logoColor=CCFF00\" alt=\"LinkedIn\" /\u003e\u003c/a\u003e\n  \u003ca href=\"mailto:hatimelhassak.official@gmail.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/EMAIL-1A1A1A?style=for-the-badge\u0026logo=gmail\u0026logoColor=CCFF00\" alt=\"Email\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ccode\u003e///\u0026nbsp;\u0026nbsp;OPEN FOR NEW WORK\u0026nbsp;\u0026nbsp;///\u0026nbsp;\u0026nbsp;CONTRACT \u0026amp; FREELANCE\u0026nbsp;\u0026nbsp;///\u0026nbsp;\u0026nbsp;REMOTE WORLDWIDE\u0026nbsp;\u0026nbsp;///\u003c/code\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatimhtm%2Fchina-global-study","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhatimhtm%2Fchina-global-study","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhatimhtm%2Fchina-global-study/lists"}