Home › How this site works
How this site works
What is behind the pages, drawn as pictures. Pick the view that suits you.
The 9S system, in pictures
For colleagues: what it is, how it works, what runs when
What it does, in 5 sentences
- The 9S system helps owners of the Mahindra XEV 9S talk to each other and get quick help in WhatsApp groups.
- A friendly bot listens in those groups and answers questions from the car manual, checked guides and earlier chats, and it always says where the answer came from.
- Every day it gathers the best of the chat into a short digest, which the admins check before anything is shared.
- The same knowledge feeds a public website (guides, photos, prices, an ask page) and a private admin website where the team handles members, joins and settings.
- At night it refreshes everything, makes a safe backup, and messages the owner on Telegram if something looks wrong.
1. The big picture
2. Life of one question
3. A normal day
What admins can do
Members and joins
- Approve or decline people who ask to join
- See who is in which group
- Remove members when needed
Digests and notices
- Read the morning digest before it goes out
- Write announcements
- Send and check the daily tip
Bot and AI
- Choose which AI helpers answer
- Check and improve saved answers
- Turn commands on or off
Photos and videos
- Review member photos (faces are blurred)
- Fix car colours and covers
- Promo videos for the groups
Website pages
- Edit pages, news and "what is new"
- Prices and creators lists
- Preview before publishing
Health and safety
- A dashboard of what is running
- Login alerts
- Settings for quiet hours and limits
What is coming next
Ideas, not promises. The owner decides.
- Control the bot from Telegram: pause, resume, and a special alert if WhatsApp blocks the number. Today Telegram only sends news out.
- More WhatsApp numbers. The feature is built but switched off until it is needed.
- More pages on the public site, and a final week of checking before the old preview is retired.
- Tidy-up: retire the old website look and the old admin look once the new ones have run smoothly for a few weeks.
- One shared way to send alerts, so Telegram and WhatsApp messages follow the same rules.
Made from the system map. Hand-drawn style, works offline, prints on A4.
Technical view
How the parts fit together, in plain words. The full handbook (for admins) has the file-level detail.
1. The big picture
2. Life of one question
3. A normal day
Feature table (129 features)
Green = in use, red = retired, amber = being checked. Type to filter or pick a status or area.
| Feature | Area | Status |
|---|---|---|
| Web service + app | admin-site | live |
| Login and roles | admin-site | live |
| Admin home page | admin-site | live |
| AI admin (27 routes) | admin-site | live |
| Settings (20) incl. WhatsApp | admin-site | live |
| Members + master table | admin-site | live |
| Join approvals | admin-site | live |
| Admin inbox, images, clean-up and creator tools | admin-site | live |
| Digest admin (24) | admin-site | live |
| Website page editor | admin-site | live |
| BIGRUN add-ons (credentials, channels, numbers, membership, logs, prices, Mahindra tick, event video, name opt-out) | admin-site | live |
| Announce admin | admin-site | live |
| Admin-only maintenance console | admin-site | live |
| New admin look (in progress) | admin-site | live |
| Menu | admin-site | live |
| Admin tracker, chat and data questions | admin-site | unknown |
| Internal + misc routes | admin-site | live |
| Answer composition | bot-brain | live |
| Retrieval | bot-brain | live |
| Vector index | bot-brain | live |
| AI engine layer | bot-brain | live |
| AI model + price upkeep | bot-brain | live |
| Answer bank | bot-brain | live |
| Question answering, judging and testing | bot-brain | live |
| Reply queue | bot-brain | live |
| Hourly search refresh | bot-brain | live |
| KB build | bot-brain | live |
| Group commands, front desk and notices | bot-brain | live |
| Runner answers | bot-brain | live |
| Route plan | bot-brain | unknown |
| Autoreply | bot-brain | unknown |
| golive1 search build | bot-brain | unknown |
| Digest approval flow | digests-alerts | live |
| Old digest schedule | digests-alerts | dead |
| Digest alerts | digests-alerts | live |
| Digest autopost (path-triggered) | digests-alerts | live |
| Public digest pages + SEO | digests-alerts | live |
| Weekly digest + backfill | digests-alerts | unknown |
| Telegram outgoing notices | digests-alerts | live |
| Security and login alerts | digests-alerts | live |
| Owner messages (limited per day, quiet at night) | digests-alerts | live |
| Daily tip | digests-alerts | live |
| Health and status reports | digests-alerts | live |
| Announcements + comeback | digests-alerts | unknown |
| Public website build (all pages) | fable-site | live |
| Public website serving | fable-site | live |
| Site switch and rollback | fable-site | live (manual) |
| Website preview copy | fable-site | live (staging) |
| Fable self-check | fable-site | unknown |
| Nightly site timers | fable-site | live |
| Old static site build | fable-site | live (secondary) |
| Old site FastAPI layer | fable-site | live |
| Site stats timer | fable-site | unknown |
| IndexNow ping | fable-site | live |
| Old-site helpers | fable-site | live (helpers) |
| Core gateway process | gateway | live |
| Connector control functions | gateway | live |
| Connector sending functions | gateway | live |
| Join and member actions | gateway | live |
| Safety checks before sending | gateway | live |
| Restore + comeback + DM archive | gateway | live |
| Presence, receipts, reconnect, media | gateway | live |
| Secondary numbers gateway | gateway | unknown |
| Message listener | gateway | live |
| Number and part helpers | gateway | live |
| Background worker health | gateway | live |
| Live ingest | ingestion-people | live |
| Roster sync | ingestion-people | live |
| Nightly media import | ingestion-people | live |
| Receipts rollup | ingestion-people | live |
| Recycle-bin purge | ingestion-people | live |
| Mode check | ingestion-people | live |
| Join executor | ingestion-people | live |
| Approvals, join rules and waiting list | ingestion-people | live |
| People pipeline | ingestion-people | live |
| Old matching one-offs | ingestion-people | unknown |
| Chat export reading | ingestion-people | live |
| Misc: group topics, other groups, DM archive, ingest measure | ingestion-people | unknown |
| bigrun1-7 scripts (~27) + runners | legacy-scripts | dead |
| bigrun6 alert | legacy-scripts | live |
| Admin feature batches (large) | legacy-scripts | live |
| Old redesign helper scripts | legacy-scripts | dead |
| Site2 WP-archive purge | legacy-scripts | live |
| Retired scripts | legacy-scripts | dead |
| Old one-time check scripts | legacy-scripts | dead (frozen) |
| Admin redesign helper scripts | legacy-scripts | unknown |
| Old screenshot and proof scripts | legacy-scripts | dead |
| Old reply-fix scripts | legacy-scripts | dead |
| One-time data clean-ups | legacy-scripts | dead |
| Public Ask AI | public-features | live |
| Site search | public-features | live |
| Gallery + populate | public-features | live |
| Photo review, colours, covers | public-features | live |
| Prices | public-features | live |
| FRESH auto-update | public-features | live |
| Old nightly fact-check extras | public-features | dead |
| Promo and judged videos | public-features | live (judge) / unknown (collect) |
| Social posts and creators | public-features | live |
| About pages | public-features | live |
| Manual and event maintenance tools | public-features | unknown |
| Web helpers | public-features | live |
| Frequent small jobs (every minute to hour) | scheduled-jobs | live |
| Digest morning 06:30 | scheduled-jobs | live |
| Old digest schedule (retired) | scheduled-jobs | dead |
| FRESH auto 23:00 UTC | scheduled-jobs | live |
| Old nightly fact-check (replaced) | scheduled-jobs | dead |
| Backups, snapshots, purge and health checks | scheduled-jobs | live |
| Content nightly | scheduled-jobs | live |
| Site | scheduled-jobs | live |
| Video | scheduled-jobs | live / unknown |
| Bigrun resume | scheduled-jobs | dead |
| Weekly backfill service | scheduled-jobs | unknown |
| WordPress hybrid (docker) | scheduled-jobs | dead |
| Crontab (other projects) | scheduled-jobs | live (not 9S) |
| Background sessions | scheduled-jobs | live |
| Docker containers (other projects) | scheduled-jobs | live (not 9S) |
| Nightly backup + encryption | tools-ops | live |
| Config snapshot | tools-ops | live |
| Private code backup copy | tools-ops | live |
| Privacy scans | tools-ops | unknown |
| Safe restart helpers | tools-ops | live |
| Claude coordination | tools-ops | live |
| Site cutover + undo switches | tools-ops | live (switch) / one-shot (undo) |
| Server hardening one-time steps | tools-ops | unknown |
| Shared lib helpers | tools-ops | live |
| Site content adders | tools-ops | live |
| Admin snapshot | tools-ops | unknown |
| System map inventory | tools-ops | live (manual) |
| Tests | tools-ops | live |
Findings A to E
What the review found, in plain words.
A. Duplicates
- The old website builder is still needed for its picture helpers
- The old web layer still handles some old addresses
- Two admin looks exist side by side
- Telegram and WhatsApp alerts overlap on purpose
- Three privacy scans: keep, add one shared test
- Many old one-time check scripts sit beside the modern tests
B. Dead or redundant
- Several scheduled jobs were replaced but their old wiring is still there
- One alert still fires for a finished job
- Dozens of one-time scripts from finished projects
- A removed blog stack still has files in the code history
- One reply helper is no longer used (its settings stay)
- Three jobs start at the same minute at night
C. Unknown, now resolved
- Tracker, chat, overlap and data questions: in use
- Site statistics job: in use (the first map was wrong)
- Extra WhatsApp numbers: built but dormant by design
- A few helper tools still wait for an owner decision
D. Planned, not built
- Telegram control panel: only sending exists
- Automation tool ingestion: never built here
- Drive import: belongs to a different project
- Extra WhatsApp numbers: code only
E. Doc drift
- Notes said the nightly fact-check was off: it is on (fixed)
- Several map rows and counts were out of date (fixed)
- Two old notes about retired pages and Telegram were wrong (fixed)
- A few background jobs are not kept with the code yet
Clean-up plan
Smallest risk first. Each step is approved one at a time.
Batch 1: fix docs done
Notes and maps corrected.
Batch 2: repo hygiene owner approves
Stop tracking generated and removed files; keep job definitions with the code.
Batch 3: move dead scripts owner approves
Move finished one-off scripts to a retired folder. Nothing deleted.
Batch 4: stop the noise owner approves
Switch off jobs that no longer do anything; spread out the busy night minute.
Batch 5: security follow-ups owner approves
Optional key refresh and login choices.
Batch 6: small code deletes owner approves
Remove code nobody calls any more.
Batch 7: bigger refactors owner approves
Each is its own task.
Glossary
- Bot
- The WhatsApp helper that answers questions in groups.
- Gateway
- The program that stays connected to WhatsApp and sends or receives messages.
- Group
- A WhatsApp group of owners. Some are community groups, one is for the bot team.
- Digest
- A short summary of the best chat of the day or week, checked by admins before posting.
- Retrieval
- Looking up the right passages of the manual, guides and chats for a question.
- Vector index
- A search index that finds text by meaning, not only by exact words. Rebuilt nightly.
- KB (knowledge base)
- The collected manual, official docs and chat threads the bot learns from.
- Answer bank
- Saved good answers, reused so replies are fast and consistent.
- Tag
- The small note on an answer that shows where it came from.
- Timer / tick
- A scheduled job. A tick is a very frequent small one (every minute or few).
- Executor
- The background worker that carries out approved joins and removals.
- Fable
- The name of the new public website look (old one is retired but still helps behind the scenes).
- FRESH
- The nightly check that updates site facts automatically, with a log so changes can be undone.
- BIGRUN
- Old big batch projects (numbers 1 to 7). Finished.
- Recycle bin
- Holds removed items for a while before nightly purge.