English Mithra · Trainers · inventory as of 14 Oct 2026

EM Trainers System

Everything built so far for the EM trainers programme: what each piece does, where it runs, which screens work for EM, and the full 54-day lesson course. Checked read-only against the live server today.

Status at a glance

Three builds, one is current

Built · staging

Trainer Command Center (EM port)

EP's Trainer Command Center rebuilt for English Mithra, with its own lesson-sending engine instead of n8n. This is the current system.

  • Address: emtcc.srv1544679.hstgr.cloud
  • Code: /root/EMTrainerCommandCenter (2 commits)
  • Built 6 Oct 2026, running 8 days
Not started

ForgeGrowth for EM

Planned: chats, WhatsApp numbers and the automation builder, with the lessons sent by automations. TCC stays as the dashboard beside it.

  • Code copied to /root/EMTrainersGrowth, unchanged
  • Blocked at the database step, waiting for your OK
Old · still live

ForgeCRM copy (July)

The first EM Trainers build: a full ForgeChat/ForgeCRM clone with a Lessons tab. It has no students, chats or WhatsApp number.

  • Address: emtrainers.srv1544679.hstgr.cloud
  • Code: /root/EMTrainersForgeCRM
  • Login needs tightening (see open items)
54lesson days
736lesson messages
13.1 htrainer audio
0students enrolled
0trainers added
0WhatsApp numbers connected

Nothing has been sent to any student yet. The engine is switched on, but its only run (6 Oct) stopped with "no bot number registered".

How it works for a student

One lesson day

08:00 IST, Mon–SatDay templateThe bot sends the approved day template with a Start button. Sundays and marked holidays are skipped.
Student taps StartLesson startsOnly the first tap counts. With the current setting, any reply also counts as Start.
In orderDay's messagesText, voice notes and images go out one by one. Each waits for WhatsApp to confirm the previous one.
After the lessonTrainer footer"Your trainers for today", listing the student's Morning, Evening and Night trainers with numbers. Substitutions from Trainer Support apply.
HomeworkChat with trainerThe student sends homework to their trainer's own WhatsApp. Those chats show in the dashboard once trainer numbers are connected.
No tapRemindersThe template is sent again after 1, 1, 4, 5 and 7 days, then reminders stop.
Ready→ template →Waiting_start→ Start tap →Waiting_completed→ next morning: day + 1

A student who never taps moves to follow_up_sent. Every step is written to the student's day log (waiting_start, follow_up_sent, waiting_completed); manual sends from the dashboard log completed. After Day 54 the student gets the completion message.

Built for EM · backend/em-engine

The lesson engine

About 1,400 lines that replace EP's n8n workflows. EM runs with no n8n, NocoBase or NocoDB.

PartFileWhat it does
Daily sendcron.jsChecks every minute and runs once per date at or after the send time. It only claims the day when a bot number and template exist, so finishing setup later the same day still sends. It sends follow-ups first, then today's templates. A student with no weekday trainer is skipped.
WhatsApp receiverwebhook.jsMeta webhook at /api/engine/meta-webhook. Saves every incoming and outgoing message, delivery status and trainer-phone echo, downloads incoming voice notes and images, and starts the lesson on a Start tap.
Lesson deliverylesson.jsSends a day's lesson parts in order, reuses a WhatsApp media upload for 29 days and re-uploads from storage when it expires, then sends the trainer footer and, on the last day, the completion message.
Dashboard buttonshooks.jsStands in for every n8n webhook TCC used to call: reply, audio-reply, media, send-class (Send Today's Class), send-days (Bulk Classes), lessons-send (Lessons button), bulk-text, bulk-template, lesson-media-sync. EP-only actions answer "This action is not available on EM". Protected by a secret key in the address.
Setup APIadmin.jsAdmin-only: status, settings, WhatsApp numbers, trainers, enrolment, "run today's send now".
Settings & numbersstore.jsSaves settings, and stores WhatsApp tokens encrypted (AES-256-GCM). Keeps the "Lessons Bot" chat section pointed at the registered bot number.
WhatsApp client · chat logwa.js · chat.jsSends text, templates and media, uploads and downloads files. Bot chats and trainer chats are kept in separate tables, as in EP.

Current settings

SettingValue now
EngineOn
Daily send time08:00 IST
No classes onSunday
Day templateem_day_test in language ml. This looks like a test name; Meta approval not checked.
Any reply starts the lessonOn
Trainer footerDefault text with Morning (9 AM–4 PM), Evening (4 PM–11 PM) and Night (11 PM–9 AM) lines
Completion message"You have completed the course. Congratulations! 🎉"

Tested: a 26-check end-to-end test (tests/em-engine-e2e.js) runs against a fake WhatsApp and cleans up after itself. It passed 26/26 on 6 Oct: daily send, Start tap delivering Day 1 (22 messages plus footer), order and statuses, second tap ignored, next-day move, the reminder ladder, trainer chats and every dashboard button.

Built for EM · Admin → EM Setup

The setup page

Lesson engine

Template name and language, daily send time, days with no classes, trainer footer text, completion message, engine on/off, "any reply starts the lesson", Save, and Run today's send now.

WhatsApp numbers

Add the bot number (sends classes) and trainer numbers (WhatsApp Business app with coexistence). Shows the Meta webhook address and verify token to copy into Meta.

Trainers

Name, WhatsApp number, shift (Morning/Evening/Night), working days (Sunday puts them in the Sunday pool), status. Shows each trainer's weekday and Sunday student counts.

Enrol students

Paste "Name, Mobile, Class mobile" one per line and choose a start day. Each student gets the least-busy active trainer per shift plus Sunday trainers. Duplicates are refused.

Other EM changes: English Mithra logo and name, EP staff logins removed (one admin is created from server settings), trainers log in with their WhatsApp number plus one shared password, lesson audio plays with seeking, EP's Tamil/Telugu/Kannada and "Both GS" items hidden.

Inherited from EP · what works on EM

Every screen

Chat

ItemWhat it doesOn EM
Trainer ChatsChats on the trainers' own WhatsApp numbers: trainer list, then students, then messagesAfter trainer numbers are connected
Lessons BotChats with the bot number: lessons sent, Start taps, repliesAfter the bot number is added
Bulk MessageFilter students, send a template or free textYes
Inside a chatReply, voice note, play media, and the buttons Lessons, Send Today's Class, Bulk Classes, CustomYes
Student profileDetails, assigned trainers, lesson day and state (edit, stop, resume), engagement, training timeYes; EP's Speaking and 999 parts stay empty

Dashboard

PageWhat it showsOn EM
PerformanceTrainer ranking: students attended, reply time in and outside shift, chat time, rating; daily heatmaps; click through to a student's chatYes, once trainers chat with students
RatingsStudent ratings of trainersStays empty: EP's rating form is not part of EM
ProgressHow many students are on each day, dropout pointsYes
DirectorySearchable student list with state, day, replies; send class, pauseYes
Finished StudentsCompletions, time to finish, top trainers; CSV exportYes (profession breakdown needs sales data EM doesn't have)
Silent StudentsStudents who tap Start but never talk to their trainerYes
Stopped StudentsPaused or stopped studentsPartly: payment and team columns come from EP's sales system
Start TimesWhen students tap Start, delay after the template, no-showsYes
ActivityTrainer shift screenshots and call logsOnly with EP's trainer mobile app
Bulk MessageSame as in ChatYes

Admin settings (avatar menu)

TabWhat it doesOn EM
EM SetupSee aboveYes, the main EM page
Lesson ResourcesBrowse and edit the 736 lesson parts, replace a file, pre-upload to WhatsAppYes
HolidaysDates with no lessonsYes
Trainer SupportTemporary or permanent swap of the name/number shown in the footerYes
Users · Trainer LoginsDashboard logins and roles; the shared trainer passwordYes
Rejoin StudentsBulk re-enrolmentNo: only accepts EP's course IDs
Class Note · Speaking Intimation · Revision Meet · Revision ReportEP's Tamil/Telugu message textsNo effect on EM
Requests ReportMessages per bot numberUses EP's fixed bot list
App Usage · MCP Tools · AIMobile-app usage, a data connector for Claude, OpenAI analysis settingsWork technically; not set up for EM

Who can log in

RoleHowCan do
AdminOne login, admin, created from the server settingsEverything
Viewer / Content (read-only)Created in Admin → UsersChat and Dashboard; read-only hides every send button
TrainerWhatsApp number plus the shared trainer password, through the trainer mobile app's APIOnly their own students: send class, next day, stop, resume, reply, follow-ups. The mobile app itself is a separate EP product and is not part of this code.
Server · database · files

Where it runs

ContainerServesLimitsMemory used
emtcc-backendTCC API + engine1.5 CPU · 512 MB60 MB
emtcc-frontendTCC web app0.5 CPU · 128 MB8 MB
emtrainers-minioLesson files (shared by old and new)1 CPU · no memory cap201 MB
emtrainers-backend / -frontend / -redisOld ForgeCRM copyno memory cap68 · 8 · 4 MB

Database emtcc

On the shared supabase-db server, 12 MB, 61 tables in EP's table layout. Only the lessons (736 rows), course, settings and the admin login hold data. ForgeGrowth's tables are not there yet.

Lesson files

MinIO bucket emtrainers-media: 338 files named em_DAY_ORDER_TYPE (328 Ogg voice notes, 120.5 MB, and 10 JPEG images). An older copy with the original recordings sits under lessons/ (about 914 MB).

Secrets

Kept in /docker/.env under the EMTCC_* names (admin and trainer passwords, keys). WhatsApp tokens will be stored encrypted in the database. None are in git or on this page.

Course 1 · "EM Trainer Basic" · Kerala

The lessons

English taught in Malayalam, with English examples. A typical day opens with a "Day N" heading and a quote for the day, alternates explanation text with the trainer's voice notes, and ends with an activity or homework to send to the personal trainer plus a Word of the day.

398text messages
328voice notes
10images (Days 13, 36)
789 minaudio, ~15 min a day
~9 weeksto finish, with Sundays off
Days 1–4 · FoundationsSelf-introduction, pronouns, subject-verb-object, everyday phrases
Days 5–11 · Helping verbsis/am/are, was/were, has/have/had, do/does, did, polite requests
Days 12–21 · TensesSimple and continuous tenses, prepositions of time and place, to/for
Day 16 · Exam 1Tenses, do/does/did, helping verbs
Days 22–31 · Modals & structurecan/will, may/might, email writing, "very", if, passive voice, relative pronouns, during/while
Day 32 · Exam 2to/for, continuous tenses, passive and more (text only)
Days 33–50 · Accuracy & fluencyPhrasal verbs, find-the-mistakes, nouns, for/since, confused words, have to/must, used to, JAM speaking
Days 51–53 · Reported speechPresent, past, future
Day 54 · Final examText only, then the completion message
TextVoice noteImage· "Order" shows each day's messages in send order · audio bar is minutes of voice notes
DayTopic and contentMsgsText·Audio·ImgOrderAudio min
1Self-introduction: greetings by time of day (good morning/afternoon/evening/night), saying your name ("Myself X" and "My good name" marked wrong), where you come from, your job, family, hobbies ("I am fond of…"), education, then a demo introduction. Activities: tell your trainer what you find hard about speaking English, and send your own self-introduction. WotD Minute 2212·10·0
22.0
2Daily-use words: personal pronouns and possessives (I/my/mine, you/your, we/our, he/his, she/her, they/their, this/that). Activity: one sentence per word. WotD Evident 2111·10·0
22.9
3Sentence formation: Subject + Verb + Object (what a subject, verb and object are). Homework: rearrange jumbled sentences. WotD Forsake 1810·8·0
25.7
4Daily-use sentences: "Can you please repeat that?", "I'm busy, please call me later", "I hope that…", "How much does it cost?", "I feel…", "Let's…". Activity: a 1-minute voice note on "My best friend". WotD Wrap 169·7·0
10.5
5Is / Am / Are (the present form of "to be", which means "ആണ്"). WotD Boon 178·9·0
21.2
6Was / Were (past "to be"), including "If I were…" for wishes. WotD Impart 158·7·0
10.9
7Has / Have / Had: owning things, events, and use in place of eat/drink ("We have lunch"). WotD Borrow 1711·6·0
16.4
8Do / Does / Don't / Doesn't: habits ("ചെയ്യാറുണ്ട്", "does it usually"), negatives and questions. Reading story "Farmer and his wife". WotD Insist 2111·10·0
28.1
9Did / Didn't: past action, negatives and questions ("Did you read the paper?"). WotD Concern 158·7·0
15.8
10Everyday Malayalam-to-English patterns: "Do/Does + like" (do you like?), "could" (was able to), "Why did…", "Don't you…?", "have to/has to". WotD Grief 1910·9·0
23.8
11Polite requests: can, could, may, will, would (formal versus casual). Homework: real-life role-play situations, such as asking for a seat on a bus. WotD Cautious 1910·9·0
18.8
12Simple present tense: format, habits, universal truths, likes and dislikes, fixed future events. WotD Abide 1910·9·0
29.4
13Simple past tense (Subject + V2 + Object), plus 5 English Mithra verb charts (Malayalam word, then V1 / V2 / V3 / V+ing). WotD Issue 187·6·5
13.1
14Simple future tense (will/shall + V1). WotD Aide 116·5·0
16.6
15Prepositions of time: in / on / at. WotD Crave 168·8·0
17.8
16Exam 1 (revision): sentences in present/past/future, do/does/did questions and negatives, can/will/may/could/would, is/am/are/was/were/has/have/had 42·2·0
1.5
17Prepositions of place: in (inside, country/town, vehicle) / on (surface, floor) / at (a specific point). WotD Describe 2111·10·0
16.5
18To and For (purpose, duration, direction, receiver). WotD Worst. A second quote comes at the end. 1810·8·0
13.5
19Present continuous (is/am/are + verb-ing; happening now or longer action in progress). WotD Collide 147·7·0
19.0
20Past continuous (was/were + verb-ing). WotD Reputation 148·6·0
15.9
21Future continuous (will be + verb-ing). WotD Devout 127·5·0
10.6
22Can vs Will (ability versus determination, and as questions). No WotD 148·6·0
10.6
23May and Might (permission, uncertainty, small or past possibility). WotD Taint. A second quote comes at the end. 1810·8·0
16.9
24Email drafting: subject, salutation, body and closing, with a sample annual-leave application. Homework: write a leave email. WotD Salutation 147·7·0
23.1
25"No more VERY": replace "very + word" with one stronger word (very simple → basic, very short → brief…). WotD Nap 127·5·0
11.7
26"If" sentences (facts, things that might happen). WotD Exaggerate 127·5·0
13.5
27Active and passive voice: simple present (am/is/are + V3). WotD Obstacles 116·5·0
13.1
28Passive voice: simple past (was/were + V3). WotD Persuade 85·3·0
9.9
29Passive voice: simple future (will be + V3). Only sentences with an object can become passive. WotD Frail 106·4·0
7.5
30Relative pronouns: who, which, when, where, that. WotD Mystery 1911·8·0
28.2
31During vs While. WotD Progress 116·5·0
10.1
32Exam 2 (text only, no audio): to/for, the 3 continuous tenses, may/might, one-word replacements for "very…", if, during/while, passive conversion 22·0·0
0.0
33Phrasal verbs (depend on, do over, …). WotD Yield 106·4·0
11.4
34"Find the mistakes" error-spotting exercise ("made a world record", "preferable than", "a good news"…). WotD Impression 74·3·0
2.7
35Answers to Day 34's mistakes ("set a world record"…). WotD Abstain 94·5·0
8.5
36Countable vs uncountable nouns, plus 5 images listing uncountable nouns (gold, grammar, happiness, information, knowledge…). WotD Infuriate 177·5·5
13.3
37For vs Since (a period of time versus a point in time). WotD Dispute 96·3·0
10.5
38Commonly confused words: many/much, few/little, farther/further, high/tall. WotD Courtesy 1910·9·0
19.5
39Common mistakes ("listen to me", "there are seven girls", "at 5 pm", "speak English well", "taller", "made this salad"). WotD Argue 137·6·0
17.1
40Ways to say thank you (Thanks a lot, I can't thank you enough, I'm truly grateful, I appreciate it). Reading story "The ant and the dove". WotD Perhaps 2111·10·0
19.0
41Phrasal verbs (believe in, break down, bring up…). WotD Employ 158·7·0
15.8
42Phrasal verbs with "put" (put on, put by, put across…). WotD Accessory 95·4·0
12.1
43Have to / Must / Need to / Ought to, and their negatives (don't have to, don't need to). WotD Consistently 2111·10·0
21.3
44Common mistakes in English ("time by your watch"…). WotD Delight 95·4·0
11.8
45"Find the mistakes" in self-introduction sentences ("My good name is…", "I am 30 year old"…). Reading story "Father–Son conversation". WotD Haggle 116·5·0
11.3
46Answers to Day 45's mistakes. WotD Attitude 94·5·0
14.8
47Adverbs of frequency: always, usually, often, sometimes, seldom… No WotD 137·6·0
11.6
48"Used to" (past habits; "didn't use to"; "Did … use to?"; not for the present). No quote, no WotD 158·7·0
17.0
49Preposition "from" (origin, source…). WotD Criticize 116·5·0
10.9
50JAM (Just A Minute) speaking activity: choose a topic such as "Your mother" or "Your life five years ago". WotD Tribute 75·2·0
1.5
51Reported (indirect) speech, introduction: simple present. No quote, no WotD 74·3·0
10.0
52Reported speech: simple past (had + V3; time-word changes such as today → that day, yesterday → the day before). No WotD 137·6·0
25.0
53Reported speech: simple future (will → would). WotD Coincidence 116·5·0
9.3
54Final exam (text only, no audio): have to/ought to/need to/must, "used to", frequency adverbs, convert 5 sentences to reported speech, prepositional phrases with on/at 22·0·0
0.0

Content issues found while reading

DayIssue
1 · 35Spelling: "painiting", "choclates"
54"propositional phrases" should be "prepositional phrases"
49Homework says "two sentences" in English but "3 sentences" in Malayalam
37The "For" explanation is sent before its own title "Preposition: for and since"
18 · 23End with a second "Quote for the day", probably the next day's quote
32 · 54No voice notes (text-only exams); Day 16 ends with two voice notes in a row
16, 22, 32, 47, 48, 51, 52, 54No Word of the day. Header style also varies ("Day 01", "Day19").

Each issue can be fixed in Admin → Lesson Resources. None of the 338 files has been uploaded to WhatsApp yet; that happens on the first real send.

Open items

What still needs a decision or fixing

Security
Old site's admin login needs changing. Change it, or take the old ForgeCRM copy down.
Security
WhatsApp webhook hardening. One more server setting must be added before going live.
Cost
AI settings came with the EP copy. Set EM's own AI account before using AI analysis.
Your OK
ForgeGrowth database step. Creating ForgeGrowth's tables in emtcc was blocked twice by the safety check. Run the commands yourself or allow it.
Your call
Which app gets emtrainers.srv1544679.hstgr.cloud? Suggested: ForgeGrowth there, TCC dashboard on emtcc. The old copy stays until you decide.
Business
Before real sending: the bot number with Phone number ID, WABA ID and token; an approved day template with a Start button; the Meta webhook; trainer numbers on coexistence; trainers; students; holidays. The engine is already on, so the first 08:00 run after the bot and template are saved sends to every enrolled student.
Fix
Small gaps: a student linked only to a Sunday trainer never gets lessons; the 4 old containers have no memory cap; EP-only admin tabs are still visible.