Initial commit
This commit is contained in:
parent
38e9f81372
commit
2134b953ab
16
README.md
16
README.md
|
|
@ -1,16 +1,16 @@
|
|||
# Yimaru Backend API
|
||||
# Rezina Backend API
|
||||
|
||||
Golang API for **Yimaru Academy**, an LMS and exam-prep platform. It serves the mobile learner apps and the [Yimaru Admin](https://gitea.yaltopia.com/Yimaru/Yimaru-Admin) panel: authentication, content (Learn English + Duolingo/IELTS), practices/questions, subscriptions & payments, team RBAC, analytics, notifications, and more.
|
||||
Golang API for **Rezina**, an LMS and exam-prep platform. It serves the mobile learner apps and the [Rezina Admin](https://gitea.yaltopia.com/Rezina/Rezina-Admin) panel: authentication, content (Learn English + Duolingo/IELTS), practices/questions, subscriptions & payments, team RBAC, analytics, notifications, and more.
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Module** | `Yimaru-Backend` |
|
||||
| **Module** | `Rezina-Backend` |
|
||||
| **Language** | Go `1.25` (see `go.mod`) |
|
||||
| **HTTP** | [Fiber](https://gofiber.io/) |
|
||||
| **DB** | PostgreSQL 16 (primary) + MongoDB (app logs) |
|
||||
| **SQL** | [sqlc](https://sqlc.dev) + [golang-migrate](https://github.com/golang-migrate/migrate) |
|
||||
| **API docs** | Swagger / OpenAPI (`docs/`, `/swagger/*`) |
|
||||
| **Remote** | `https://gitea.yaltopia.com/Yimaru/Yimaru-BackEnd.git` |
|
||||
| **Remote** | `https://gitea.yaltopia.com/Rezina/Rezina-BackEnd.git` |
|
||||
| **Branches** | `main`, `production` (deploy from `production`) |
|
||||
|
||||
---
|
||||
|
|
@ -98,8 +98,8 @@ Optional: `psql`, MongoDB tools for log export.
|
|||
## Quick start
|
||||
|
||||
```bash
|
||||
git clone https://gitea.yaltopia.com/Yimaru/Yimaru-BackEnd.git
|
||||
cd Yimaru-BackEnd
|
||||
git clone https://gitea.yaltopia.com/Rezina/Rezina-BackEnd.git
|
||||
cd Rezina-BackEnd
|
||||
|
||||
# 1. Environment
|
||||
cp .env .env.local # or create .env from the table below
|
||||
|
|
@ -367,7 +367,7 @@ Reorder APIs mirror the LMS hierarchy for catalog courses, units, modules, and l
|
|||
## Project structure
|
||||
|
||||
```
|
||||
Yimaru-BackEnd/
|
||||
Rezina-BackEnd/
|
||||
├── cmd/main.go # Entry + DI wiring
|
||||
├── db/
|
||||
│ ├── migrations/ # golang-migrate SQL
|
||||
|
|
@ -468,4 +468,4 @@ Detailed contracts for the admin UI live under `docs/`:
|
|||
|
||||
## License
|
||||
|
||||
Proprietary — Yaltopia / Yimaru Academy. Internal use only unless otherwise licensed.
|
||||
Proprietary — Yaltopia / Rezina. Internal use only unless otherwise licensed.
|
||||
|
|
|
|||
98
cmd/main.go
98
cmd/main.go
|
|
@ -1,55 +1,55 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
_ "Yimaru-Backend/docs"
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
"Yimaru-Backend/internal/config"
|
||||
"Yimaru-Backend/internal/domain"
|
||||
customlogger "Yimaru-Backend/internal/logger"
|
||||
"Yimaru-Backend/internal/logger/mongoLogger"
|
||||
minioclient "Yimaru-Backend/internal/pkgs/minio"
|
||||
"Yimaru-Backend/internal/repository"
|
||||
activitylogservice "Yimaru-Backend/internal/services/activity_log"
|
||||
"Yimaru-Backend/internal/services/arifpay"
|
||||
"Yimaru-Backend/internal/services/appversions"
|
||||
"Yimaru-Backend/internal/services/chapa"
|
||||
"Yimaru-Backend/internal/services/assessment"
|
||||
"Yimaru-Backend/internal/services/authentication"
|
||||
cloudconvertservice "Yimaru-Backend/internal/services/cloudconvert"
|
||||
coursesservice "Yimaru-Backend/internal/services/courses"
|
||||
"Yimaru-Backend/internal/services/emailtemplates"
|
||||
"Yimaru-Backend/internal/services/examprep"
|
||||
"Yimaru-Backend/internal/services/faqs"
|
||||
issuereporting "Yimaru-Backend/internal/services/issue_reporting"
|
||||
lessonsservice "Yimaru-Backend/internal/services/lessons"
|
||||
learnernotificationsservice "Yimaru-Backend/internal/services/learnernotifications"
|
||||
"Yimaru-Backend/internal/services/lmsprogress"
|
||||
"Yimaru-Backend/internal/services/messenger"
|
||||
minioservice "Yimaru-Backend/internal/services/minio"
|
||||
moduleservice "Yimaru-Backend/internal/services/modules"
|
||||
notificationservice "Yimaru-Backend/internal/services/notification"
|
||||
personasservice "Yimaru-Backend/internal/services/personas"
|
||||
practicecontentservice "Yimaru-Backend/internal/services/practicecontent"
|
||||
practicesservice "Yimaru-Backend/internal/services/practices"
|
||||
profilefieldoptions "Yimaru-Backend/internal/services/profilefieldoptions"
|
||||
programsservice "Yimaru-Backend/internal/services/programs"
|
||||
"Yimaru-Backend/internal/services/questions"
|
||||
ratingsservice "Yimaru-Backend/internal/services/ratings"
|
||||
rbacservice "Yimaru-Backend/internal/services/rbac"
|
||||
"Yimaru-Backend/internal/services/recommendation"
|
||||
"Yimaru-Backend/internal/services/settings"
|
||||
"Yimaru-Backend/internal/services/subscriptions"
|
||||
"Yimaru-Backend/internal/services/team"
|
||||
vimeoservice "Yimaru-Backend/internal/services/vimeo"
|
||||
_ "Rezina-Backend/docs"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"Rezina-Backend/internal/config"
|
||||
"Rezina-Backend/internal/domain"
|
||||
customlogger "Rezina-Backend/internal/logger"
|
||||
"Rezina-Backend/internal/logger/mongoLogger"
|
||||
minioclient "Rezina-Backend/internal/pkgs/minio"
|
||||
"Rezina-Backend/internal/repository"
|
||||
activitylogservice "Rezina-Backend/internal/services/activity_log"
|
||||
"Rezina-Backend/internal/services/arifpay"
|
||||
"Rezina-Backend/internal/services/appversions"
|
||||
"Rezina-Backend/internal/services/chapa"
|
||||
"Rezina-Backend/internal/services/assessment"
|
||||
"Rezina-Backend/internal/services/authentication"
|
||||
cloudconvertservice "Rezina-Backend/internal/services/cloudconvert"
|
||||
coursesservice "Rezina-Backend/internal/services/courses"
|
||||
"Rezina-Backend/internal/services/emailtemplates"
|
||||
"Rezina-Backend/internal/services/examprep"
|
||||
"Rezina-Backend/internal/services/faqs"
|
||||
issuereporting "Rezina-Backend/internal/services/issue_reporting"
|
||||
lessonsservice "Rezina-Backend/internal/services/lessons"
|
||||
learnernotificationsservice "Rezina-Backend/internal/services/learnernotifications"
|
||||
"Rezina-Backend/internal/services/lmsprogress"
|
||||
"Rezina-Backend/internal/services/messenger"
|
||||
minioservice "Rezina-Backend/internal/services/minio"
|
||||
moduleservice "Rezina-Backend/internal/services/modules"
|
||||
notificationservice "Rezina-Backend/internal/services/notification"
|
||||
personasservice "Rezina-Backend/internal/services/personas"
|
||||
practicecontentservice "Rezina-Backend/internal/services/practicecontent"
|
||||
practicesservice "Rezina-Backend/internal/services/practices"
|
||||
profilefieldoptions "Rezina-Backend/internal/services/profilefieldoptions"
|
||||
programsservice "Rezina-Backend/internal/services/programs"
|
||||
"Rezina-Backend/internal/services/questions"
|
||||
ratingsservice "Rezina-Backend/internal/services/ratings"
|
||||
rbacservice "Rezina-Backend/internal/services/rbac"
|
||||
"Rezina-Backend/internal/services/recommendation"
|
||||
"Rezina-Backend/internal/services/settings"
|
||||
"Rezina-Backend/internal/services/subscriptions"
|
||||
"Rezina-Backend/internal/services/team"
|
||||
vimeoservice "Rezina-Backend/internal/services/vimeo"
|
||||
"context"
|
||||
|
||||
// referralservice "Yimaru-Backend/internal/services/referal"
|
||||
"Yimaru-Backend/internal/services/transaction"
|
||||
"Yimaru-Backend/internal/services/user"
|
||||
videoengagementservice "Yimaru-Backend/internal/services/videoengagement"
|
||||
httpserver "Yimaru-Backend/internal/web_server"
|
||||
jwtutil "Yimaru-Backend/internal/web_server/jwt"
|
||||
customvalidator "Yimaru-Backend/internal/web_server/validator"
|
||||
// referralservice "Rezina-Backend/internal/services/referal"
|
||||
"Rezina-Backend/internal/services/transaction"
|
||||
"Rezina-Backend/internal/services/user"
|
||||
videoengagementservice "Rezina-Backend/internal/services/videoengagement"
|
||||
httpserver "Rezina-Backend/internal/web_server"
|
||||
jwtutil "Rezina-Backend/internal/web_server/jwt"
|
||||
customvalidator "Rezina-Backend/internal/web_server/validator"
|
||||
"fmt"
|
||||
"log"
|
||||
"log/slog"
|
||||
|
|
@ -61,9 +61,9 @@ import (
|
|||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// @title Yimaru API
|
||||
// @title Rezina API
|
||||
// @version 1.0.1
|
||||
// @description This is server for Yimaru.
|
||||
// @description This is server for Rezina.
|
||||
// @termsOfService http://swagger.io/terms/
|
||||
// @contact.name API Support
|
||||
// @contact.url http://www.swagger.io/support
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
|||
-- ======================================================
|
||||
-- Customer/Learner Users (login via /api/v1/auth/customer-login)
|
||||
-- Credentials: email + password@123
|
||||
-- OPEN_LEARNER demo user (openlearner@yimaru.com) is seeded by migration 000061_open_learner_role.
|
||||
-- Optional sample STUDENT / OPEN_LEARNER rows below (no demo student@yimaru.com account).
|
||||
-- OPEN_LEARNER demo user (openlearner@rezina.com) is seeded by migration 000061_open_learner_role.
|
||||
-- Optional sample STUDENT / OPEN_LEARNER rows below (no demo student@rezina.com account).
|
||||
-- ======================================================
|
||||
INSERT INTO users (
|
||||
id,
|
||||
|
|
@ -46,7 +46,7 @@ VALUES
|
|||
'Kebede',
|
||||
'Male',
|
||||
'1995-01-01',
|
||||
'abebe@yimaru.com',
|
||||
'abebe@rezina.com',
|
||||
'0911001100',
|
||||
'STUDENT',
|
||||
crypt('password@123', gen_salt('bf'))::bytea,
|
||||
|
|
@ -78,7 +78,7 @@ VALUES
|
|||
'Tadesse',
|
||||
'Female',
|
||||
'1998-01-01',
|
||||
'sara@yimaru.com',
|
||||
'sara@rezina.com',
|
||||
'0911223344',
|
||||
'STUDENT',
|
||||
crypt('password@123', gen_salt('bf'))::bytea,
|
||||
|
|
@ -107,7 +107,7 @@ VALUES
|
|||
ON CONFLICT (id) DO NOTHING;
|
||||
|
||||
DELETE FROM users
|
||||
WHERE LOWER(TRIM(email)) = 'student@yimaru.com';
|
||||
WHERE LOWER(TRIM(email)) = 'student@rezina.com';
|
||||
|
||||
-- OPEN_LEARNER learners (login via /api/v1/auth/customer-login)
|
||||
-- Credentials: email + password@123
|
||||
|
|
@ -204,7 +204,7 @@ WHERE LOWER(TRIM(email)) = 'tsegaye.negera@reachforchange.org'
|
|||
-- Team Members / Admin Panel Users (login via /api/v1/team/login)
|
||||
-- Credentials: email + password@123
|
||||
-- Allowed team_role values (migration 000103): SUPER_ADMIN, ADMIN, CONTENT_MANAGER
|
||||
-- Super Admin: superadmin@yimaru.com / password@123
|
||||
-- Super Admin: superadmin@rezina.com / password@123
|
||||
-- ======================================================
|
||||
|
||||
INSERT INTO team_members (
|
||||
|
|
@ -228,7 +228,7 @@ VALUES
|
|||
(
|
||||
'Super',
|
||||
'Admin',
|
||||
'superadmin@yimaru.com',
|
||||
'superadmin@rezina.com',
|
||||
'0911001100',
|
||||
crypt('password@123', gen_salt('bf'))::bytea,
|
||||
'SUPER_ADMIN',
|
||||
|
|
@ -262,14 +262,14 @@ ON CONFLICT (email) DO UPDATE SET
|
|||
UPDATE scheduled_notifications sn
|
||||
SET created_by = tm_super.id
|
||||
FROM team_members tm_super
|
||||
WHERE LOWER(TRIM(tm_super.email)) = 'superadmin@yimaru.com'
|
||||
WHERE LOWER(TRIM(tm_super.email)) = 'superadmin@rezina.com'
|
||||
AND sn.created_by IN (
|
||||
SELECT id FROM team_members
|
||||
WHERE LOWER(TRIM(email)) IN ('admin@yimaru.com', 'content@yimaru.com')
|
||||
WHERE LOWER(TRIM(email)) IN ('admin@rezina.com', 'content@rezina.com')
|
||||
);
|
||||
|
||||
DELETE FROM team_members
|
||||
WHERE LOWER(TRIM(email)) IN ('admin@yimaru.com', 'content@yimaru.com');
|
||||
WHERE LOWER(TRIM(email)) IN ('admin@rezina.com', 'content@rezina.com');
|
||||
|
||||
-- ======================================================
|
||||
-- RBAC safety seed: ensure ADMIN / SUPER_ADMIN have permission grants
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ LOCK TABLE subscription_plans, user_subscriptions, payments IN EXCLUSIVE MODE;
|
|||
|
||||
DO $$
|
||||
BEGIN
|
||||
IF current_setting('yimaru.approve_plan_consolidation', true) IS DISTINCT FROM 'yes' THEN
|
||||
RAISE EXCEPTION 'Review the historical-plan change, then explicitly SET yimaru.approve_plan_consolidation = ''yes'' in this session';
|
||||
IF current_setting('rezina.approve_plan_consolidation', true) IS DISTINCT FROM 'yes' THEN
|
||||
RAISE EXCEPTION 'Review the historical-plan change, then explicitly SET rezina.approve_plan_consolidation = ''yes'' in this session';
|
||||
END IF;
|
||||
IF (SELECT count(*) FROM subscription_plans
|
||||
WHERE id IN (2, 9, 14) AND category = 'LEARN_ENGLISH'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
DELETE FROM users WHERE id = 13 AND email = 'openlearner@yimaru.com';
|
||||
DELETE FROM users WHERE id = 13 AND email = 'openlearner@rezina.com';
|
||||
|
||||
DELETE FROM role_permissions WHERE role_id = (SELECT id FROM roles WHERE name = 'OPEN_LEARNER');
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ INSERT INTO roles (name, description, is_system) VALUES
|
|||
)
|
||||
ON CONFLICT (name) DO NOTHING;
|
||||
|
||||
-- Demo OPEN_LEARNER (customer-login): openlearner@yimaru.com / password@123
|
||||
-- Demo OPEN_LEARNER (customer-login): openlearner@rezina.com / password@123
|
||||
INSERT INTO users (
|
||||
id,
|
||||
first_name,
|
||||
|
|
@ -50,7 +50,7 @@ VALUES
|
|||
'OpenLearner',
|
||||
'Female',
|
||||
'1999-06-01',
|
||||
'openlearner@yimaru.com',
|
||||
'openlearner@rezina.com',
|
||||
NULL,
|
||||
'OPEN_LEARNER',
|
||||
crypt('password@123', gen_salt('bf'))::bytea,
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ VALUES
|
|||
(
|
||||
'otp',
|
||||
'One-Time Password',
|
||||
'Yimaru Academy — Your verification code',
|
||||
'Yimaru Academy{{if .FirstName}}, {{.FirstName}}{{end}}
|
||||
'Rezina — Your verification code',
|
||||
'Rezina{{if .FirstName}}, {{.FirstName}}{{end}}
|
||||
|
||||
Your verification code is {{.OTP}}.
|
||||
It expires in {{.ExpiresMinutes}} minutes.
|
||||
|
|
@ -29,18 +29,18 @@ It expires in {{.ExpiresMinutes}} minutes.
|
|||
Please do not share this code with anyone.',
|
||||
$otp_html$<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Yimaru Academy</title></head>
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Rezina</title></head>
|
||||
<body style="margin:0;padding:0;background-color:#f4f6fb;font-family:Inter,Roboto,Helvetica,Arial,sans-serif;">
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background-color:#f4f6fb;padding:32px 16px;">
|
||||
<tr><td align="center">
|
||||
<table role="presentation" width="600" cellspacing="0" cellpadding="0" style="max-width:600px;width:100%;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(157,42,131,0.14);">
|
||||
<tr><td style="background:linear-gradient(135deg,#7b1f6e 0%,#9d2a83 52%,#c43a9a 100%);padding:28px 32px;text-align:center;">
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;letter-spacing:0.3px;">Yimaru Academy</p>
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;letter-spacing:0.3px;">Rezina</p>
|
||||
<p style="margin:8px 0 0;color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;">Online Learning Platform</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:32px;">
|
||||
<h1 style="margin:0 0 8px;color:#333333;font-size:24px;font-weight:700;line-height:1.3;">Your verification code</h1>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}use the code below to continue signing in to Yimaru Academy.</p>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}use the code below to continue signing in to Rezina.</p>
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0"><tr><td style="background-color:#eef4ff;border-radius:8px;padding:20px;border:1px solid #e0e8f5;text-align:center;">
|
||||
<p style="margin:0 0 6px;color:#9d2a83;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.08em;">One-time password</p>
|
||||
<p style="margin:0;color:#333333;font-size:34px;font-weight:700;letter-spacing:8px;font-family:Consolas,Monaco,monospace;">{{.OTP}}</p>
|
||||
|
|
@ -49,7 +49,7 @@ Please do not share this code with anyone.',
|
|||
<p style="margin:24px 0 0;color:#666666;font-size:14px;line-height:1.6;">If you did not request this code, you can safely ignore this email.</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:20px 32px;background-color:#fafafa;border-top:1px solid #eeeeee;text-align:center;">
|
||||
<p style="margin:0;color:#999999;font-size:12px;line-height:1.5;">© 2026 Yimaru Academy · All rights reserved</p>
|
||||
<p style="margin:0;color:#999999;font-size:12px;line-height:1.5;">© 2026 Rezina · All rights reserved</p>
|
||||
</td></tr>
|
||||
</table></td></tr></table></body></html>$otp_html$,
|
||||
'["OTP", "FirstName", "ExpiresMinutes"]'::jsonb,
|
||||
|
|
@ -59,31 +59,31 @@ Please do not share this code with anyone.',
|
|||
(
|
||||
'invitation',
|
||||
'User Invitation',
|
||||
'You are invited to Yimaru Academy',
|
||||
'You are invited to Rezina',
|
||||
'Hi{{if .FirstName}} {{.FirstName}}{{end}},
|
||||
|
||||
You have been invited{{if .InviterName}} by {{.InviterName}}{{end}} to join Yimaru Academy.
|
||||
You have been invited{{if .InviterName}} by {{.InviterName}}{{end}} to join Rezina.
|
||||
|
||||
Accept your invitation: {{.InviteLink}}',
|
||||
$invite_html$<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Yimaru Academy</title></head>
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Rezina</title></head>
|
||||
<body style="margin:0;padding:0;background-color:#f4f6fb;font-family:Inter,Roboto,Helvetica,Arial,sans-serif;">
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background-color:#f4f6fb;padding:32px 16px;">
|
||||
<tr><td align="center">
|
||||
<table role="presentation" width="600" cellspacing="0" cellpadding="0" style="max-width:600px;width:100%;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(157,42,131,0.14);">
|
||||
<tr><td style="background:linear-gradient(135deg,#7b1f6e 0%,#9d2a83 52%,#c43a9a 100%);padding:28px 32px;text-align:center;">
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Yimaru Academy</p>
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Rezina</p>
|
||||
<p style="margin:8px 0 0;color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;">Online Learning Platform</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:32px;">
|
||||
<h1 style="margin:0 0 8px;color:#333333;font-size:24px;font-weight:700;">You’re invited</h1>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}you have been invited{{if .InviterName}} by <strong style="color:#9d2a83;">{{.InviterName}}</strong>{{end}} to join Yimaru Academy.</p>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}you have been invited{{if .InviterName}} by <strong style="color:#9d2a83;">{{.InviterName}}</strong>{{end}} to join Rezina.</p>
|
||||
<p style="margin:0 0 24px;text-align:center;"><a href="{{.InviteLink}}" style="display:inline-block;background-color:#9d2a83;color:#ffffff !important;text-decoration:none;padding:14px 28px;border-radius:8px;font-weight:600;font-size:15px;">Accept invitation</a></p>
|
||||
<p style="margin:24px 0 0;color:#666666;font-size:14px;line-height:1.6;">Or copy this link: <a href="{{.InviteLink}}" style="color:#9d2a83;">{{.InviteLink}}</a></p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:20px 32px;background-color:#fafafa;border-top:1px solid #eeeeee;text-align:center;">
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Yimaru Academy · All rights reserved</p>
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Rezina · All rights reserved</p>
|
||||
</td></tr>
|
||||
</table></td></tr></table></body></html>$invite_html$,
|
||||
'["FirstName", "InviterName", "InviteLink"]'::jsonb,
|
||||
|
|
@ -93,7 +93,7 @@ Accept your invitation: {{.InviteLink}}',
|
|||
(
|
||||
'password_reset',
|
||||
'Password Reset',
|
||||
'Reset your Yimaru Academy password',
|
||||
'Reset your Rezina password',
|
||||
'Hi{{if .FirstName}} {{.FirstName}}{{end}},
|
||||
|
||||
Reset your password: {{.ResetLink}}
|
||||
|
|
@ -101,23 +101,23 @@ Reset your password: {{.ResetLink}}
|
|||
This link expires in {{.ExpiresMinutes}} minutes.',
|
||||
$reset_html$<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Yimaru Academy</title></head>
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Rezina</title></head>
|
||||
<body style="margin:0;padding:0;background-color:#f4f6fb;font-family:Inter,Roboto,Helvetica,Arial,sans-serif;">
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background-color:#f4f6fb;padding:32px 16px;">
|
||||
<tr><td align="center">
|
||||
<table role="presentation" width="600" cellspacing="0" cellpadding="0" style="max-width:600px;width:100%;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(157,42,131,0.14);">
|
||||
<tr><td style="background:linear-gradient(135deg,#7b1f6e 0%,#9d2a83 52%,#c43a9a 100%);padding:28px 32px;text-align:center;">
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Yimaru Academy</p>
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Rezina</p>
|
||||
<p style="margin:8px 0 0;color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;">Online Learning Platform</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:32px;">
|
||||
<h1 style="margin:0 0 8px;color:#333333;font-size:24px;font-weight:700;">Reset your password</h1>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}we received a request to reset your Yimaru Academy password. The link below expires in {{.ExpiresMinutes}} minutes.</p>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}we received a request to reset your Rezina password. The link below expires in {{.ExpiresMinutes}} minutes.</p>
|
||||
<p style="margin:0 0 24px;text-align:center;"><a href="{{.ResetLink}}" style="display:inline-block;background-color:#9d2a83;color:#ffffff !important;text-decoration:none;padding:14px 28px;border-radius:8px;font-weight:600;font-size:15px;">Reset password</a></p>
|
||||
<p style="margin:24px 0 0;color:#666666;font-size:14px;line-height:1.6;">If you did not request a reset, ignore this email.</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:20px 32px;background-color:#fafafa;border-top:1px solid #eeeeee;text-align:center;">
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Yimaru Academy · All rights reserved</p>
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Rezina · All rights reserved</p>
|
||||
</td></tr>
|
||||
</table></td></tr></table></body></html>$reset_html$,
|
||||
'["FirstName", "ResetLink", "ExpiresMinutes"]'::jsonb,
|
||||
|
|
@ -127,28 +127,28 @@ This link expires in {{.ExpiresMinutes}} minutes.',
|
|||
(
|
||||
'welcome',
|
||||
'Welcome Email',
|
||||
'Welcome to Yimaru Academy',
|
||||
'Welcome to Rezina',
|
||||
'Hi{{if .FirstName}} {{.FirstName}}{{end}},
|
||||
|
||||
Welcome to Yimaru Academy! Sign in to get started: {{.LoginURL}}',
|
||||
Welcome to Rezina! Sign in to get started: {{.LoginURL}}',
|
||||
$welcome_html$<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Yimaru Academy</title></head>
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Rezina</title></head>
|
||||
<body style="margin:0;padding:0;background-color:#f4f6fb;font-family:Inter,Roboto,Helvetica,Arial,sans-serif;">
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background-color:#f4f6fb;padding:32px 16px;">
|
||||
<tr><td align="center">
|
||||
<table role="presentation" width="600" cellspacing="0" cellpadding="0" style="max-width:600px;width:100%;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(157,42,131,0.14);">
|
||||
<tr><td style="background:linear-gradient(135deg,#7b1f6e 0%,#9d2a83 52%,#c43a9a 100%);padding:28px 32px;text-align:center;">
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Yimaru Academy</p>
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Rezina</p>
|
||||
<p style="margin:8px 0 0;color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;">Online Learning Platform</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:32px;">
|
||||
<h1 style="margin:0 0 8px;color:#333333;font-size:24px;font-weight:700;">Welcome aboard</h1>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}your Yimaru Academy account is ready. Start learning at your own pace.</p>
|
||||
<p style="margin:0 0 24px;text-align:center;"><a href="{{.LoginURL}}" style="display:inline-block;background-color:#9d2a83;color:#ffffff !important;text-decoration:none;padding:14px 28px;border-radius:8px;font-weight:600;font-size:15px;">Sign in to Yimaru Academy</a></p>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}your Rezina account is ready. Start learning at your own pace.</p>
|
||||
<p style="margin:0 0 24px;text-align:center;"><a href="{{.LoginURL}}" style="display:inline-block;background-color:#9d2a83;color:#ffffff !important;text-decoration:none;padding:14px 28px;border-radius:8px;font-weight:600;font-size:15px;">Sign in to Rezina</a></p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:20px 32px;background-color:#fafafa;border-top:1px solid #eeeeee;text-align:center;">
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Yimaru Academy · All rights reserved</p>
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Rezina · All rights reserved</p>
|
||||
</td></tr>
|
||||
</table></td></tr></table></body></html>$welcome_html$,
|
||||
'["FirstName", "LoginURL"]'::jsonb,
|
||||
|
|
@ -162,13 +162,13 @@ Welcome to Yimaru Academy! Sign in to get started: {{.LoginURL}}',
|
|||
'{{.Message}}',
|
||||
$custom_html$<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Yimaru Academy</title></head>
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Rezina</title></head>
|
||||
<body style="margin:0;padding:0;background-color:#f4f6fb;font-family:Inter,Roboto,Helvetica,Arial,sans-serif;">
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background-color:#f4f6fb;padding:32px 16px;">
|
||||
<tr><td align="center">
|
||||
<table role="presentation" width="600" cellspacing="0" cellpadding="0" style="max-width:600px;width:100%;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(157,42,131,0.14);">
|
||||
<tr><td style="background:linear-gradient(135deg,#7b1f6e 0%,#9d2a83 52%,#c43a9a 100%);padding:28px 32px;text-align:center;">
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Yimaru Academy</p>
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Rezina</p>
|
||||
<p style="margin:8px 0 0;color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;">Online Learning Platform</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:32px;">
|
||||
|
|
@ -176,7 +176,7 @@ Welcome to Yimaru Academy! Sign in to get started: {{.LoginURL}}',
|
|||
<div style="margin:0;color:#666666;font-size:15px;line-height:1.6;">{{.Message}}</div>
|
||||
</td></tr>
|
||||
<tr><td style="padding:20px 32px;background-color:#fafafa;border-top:1px solid #eeeeee;text-align:center;">
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Yimaru Academy · All rights reserved</p>
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Rezina · All rights reserved</p>
|
||||
</td></tr>
|
||||
</table></td></tr></table></body></html>$custom_html$,
|
||||
'["Subject", "Message"]'::jsonb,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
-- Refresh system email templates with Yimaru Academy branded HTML (admin portal colors).
|
||||
-- Refresh system email templates with Rezina branded HTML (admin portal colors).
|
||||
-- Safe to run after 000066 when seeds used the original plain layout.
|
||||
|
||||
UPDATE email_templates SET
|
||||
name = 'One-Time Password',
|
||||
subject = 'Yimaru Academy — Your verification code',
|
||||
body_text = 'Yimaru Academy{{if .FirstName}}, {{.FirstName}}{{end}}
|
||||
subject = 'Rezina — Your verification code',
|
||||
body_text = 'Rezina{{if .FirstName}}, {{.FirstName}}{{end}}
|
||||
|
||||
Your verification code is {{.OTP}}.
|
||||
It expires in {{.ExpiresMinutes}} minutes.
|
||||
|
|
@ -12,18 +12,18 @@ It expires in {{.ExpiresMinutes}} minutes.
|
|||
Please do not share this code with anyone.',
|
||||
body_html = $otp_html$<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Yimaru Academy</title></head>
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Rezina</title></head>
|
||||
<body style="margin:0;padding:0;background-color:#f4f6fb;font-family:Inter,Roboto,Helvetica,Arial,sans-serif;">
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background-color:#f4f6fb;padding:32px 16px;">
|
||||
<tr><td align="center">
|
||||
<table role="presentation" width="600" cellspacing="0" cellpadding="0" style="max-width:600px;width:100%;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(157,42,131,0.14);">
|
||||
<tr><td style="background:linear-gradient(135deg,#7b1f6e 0%,#9d2a83 52%,#c43a9a 100%);padding:28px 32px;text-align:center;">
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;letter-spacing:0.3px;">Yimaru Academy</p>
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;letter-spacing:0.3px;">Rezina</p>
|
||||
<p style="margin:8px 0 0;color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;">Online Learning Platform</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:32px;">
|
||||
<h1 style="margin:0 0 8px;color:#333333;font-size:24px;font-weight:700;line-height:1.3;">Your verification code</h1>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}use the code below to continue signing in to Yimaru Academy.</p>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}use the code below to continue signing in to Rezina.</p>
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0"><tr><td style="background-color:#eef4ff;border-radius:8px;padding:20px;border:1px solid #e0e8f5;text-align:center;">
|
||||
<p style="margin:0 0 6px;color:#9d2a83;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.08em;">One-time password</p>
|
||||
<p style="margin:0;color:#333333;font-size:34px;font-weight:700;letter-spacing:8px;font-family:Consolas,Monaco,monospace;">{{.OTP}}</p>
|
||||
|
|
@ -32,7 +32,7 @@ Please do not share this code with anyone.',
|
|||
<p style="margin:24px 0 0;color:#666666;font-size:14px;line-height:1.6;">If you did not request this code, you can safely ignore this email.</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:20px 32px;background-color:#fafafa;border-top:1px solid #eeeeee;text-align:center;">
|
||||
<p style="margin:0;color:#999999;font-size:12px;line-height:1.5;">© 2026 Yimaru Academy · All rights reserved</p>
|
||||
<p style="margin:0;color:#999999;font-size:12px;line-height:1.5;">© 2026 Rezina · All rights reserved</p>
|
||||
</td></tr>
|
||||
</table></td></tr></table></body></html>$otp_html$,
|
||||
updated_at = NOW()
|
||||
|
|
@ -40,31 +40,31 @@ WHERE slug = 'otp';
|
|||
|
||||
UPDATE email_templates SET
|
||||
name = 'User Invitation',
|
||||
subject = 'You are invited to Yimaru Academy',
|
||||
subject = 'You are invited to Rezina',
|
||||
body_text = 'Hi{{if .FirstName}} {{.FirstName}}{{end}},
|
||||
|
||||
You have been invited{{if .InviterName}} by {{.InviterName}}{{end}} to join Yimaru Academy.
|
||||
You have been invited{{if .InviterName}} by {{.InviterName}}{{end}} to join Rezina.
|
||||
|
||||
Accept your invitation: {{.InviteLink}}',
|
||||
body_html = $invite_html$<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Yimaru Academy</title></head>
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Rezina</title></head>
|
||||
<body style="margin:0;padding:0;background-color:#f4f6fb;font-family:Inter,Roboto,Helvetica,Arial,sans-serif;">
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background-color:#f4f6fb;padding:32px 16px;">
|
||||
<tr><td align="center">
|
||||
<table role="presentation" width="600" cellspacing="0" cellpadding="0" style="max-width:600px;width:100%;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(157,42,131,0.14);">
|
||||
<tr><td style="background:linear-gradient(135deg,#7b1f6e 0%,#9d2a83 52%,#c43a9a 100%);padding:28px 32px;text-align:center;">
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Yimaru Academy</p>
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Rezina</p>
|
||||
<p style="margin:8px 0 0;color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;">Online Learning Platform</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:32px;">
|
||||
<h1 style="margin:0 0 8px;color:#333333;font-size:24px;font-weight:700;">You’re invited</h1>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}you have been invited{{if .InviterName}} by <strong style="color:#9d2a83;">{{.InviterName}}</strong>{{end}} to join Yimaru Academy.</p>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}you have been invited{{if .InviterName}} by <strong style="color:#9d2a83;">{{.InviterName}}</strong>{{end}} to join Rezina.</p>
|
||||
<p style="margin:0 0 24px;text-align:center;"><a href="{{.InviteLink}}" style="display:inline-block;background-color:#9d2a83;color:#ffffff !important;text-decoration:none;padding:14px 28px;border-radius:8px;font-weight:600;font-size:15px;">Accept invitation</a></p>
|
||||
<p style="margin:24px 0 0;color:#666666;font-size:14px;line-height:1.6;">Or copy this link: <a href="{{.InviteLink}}" style="color:#9d2a83;">{{.InviteLink}}</a></p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:20px 32px;background-color:#fafafa;border-top:1px solid #eeeeee;text-align:center;">
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Yimaru Academy · All rights reserved</p>
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Rezina · All rights reserved</p>
|
||||
</td></tr>
|
||||
</table></td></tr></table></body></html>$invite_html$,
|
||||
updated_at = NOW()
|
||||
|
|
@ -72,7 +72,7 @@ WHERE slug = 'invitation';
|
|||
|
||||
UPDATE email_templates SET
|
||||
name = 'Password Reset',
|
||||
subject = 'Reset your Yimaru Academy password',
|
||||
subject = 'Reset your Rezina password',
|
||||
body_text = 'Hi{{if .FirstName}} {{.FirstName}}{{end}},
|
||||
|
||||
Reset your password: {{.ResetLink}}
|
||||
|
|
@ -80,23 +80,23 @@ Reset your password: {{.ResetLink}}
|
|||
This link expires in {{.ExpiresMinutes}} minutes.',
|
||||
body_html = $reset_html$<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Yimaru Academy</title></head>
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Rezina</title></head>
|
||||
<body style="margin:0;padding:0;background-color:#f4f6fb;font-family:Inter,Roboto,Helvetica,Arial,sans-serif;">
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background-color:#f4f6fb;padding:32px 16px;">
|
||||
<tr><td align="center">
|
||||
<table role="presentation" width="600" cellspacing="0" cellpadding="0" style="max-width:600px;width:100%;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(157,42,131,0.14);">
|
||||
<tr><td style="background:linear-gradient(135deg,#7b1f6e 0%,#9d2a83 52%,#c43a9a 100%);padding:28px 32px;text-align:center;">
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Yimaru Academy</p>
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Rezina</p>
|
||||
<p style="margin:8px 0 0;color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;">Online Learning Platform</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:32px;">
|
||||
<h1 style="margin:0 0 8px;color:#333333;font-size:24px;font-weight:700;">Reset your password</h1>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}we received a request to reset your Yimaru Academy password. The link below expires in {{.ExpiresMinutes}} minutes.</p>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}we received a request to reset your Rezina password. The link below expires in {{.ExpiresMinutes}} minutes.</p>
|
||||
<p style="margin:0 0 24px;text-align:center;"><a href="{{.ResetLink}}" style="display:inline-block;background-color:#9d2a83;color:#ffffff !important;text-decoration:none;padding:14px 28px;border-radius:8px;font-weight:600;font-size:15px;">Reset password</a></p>
|
||||
<p style="margin:24px 0 0;color:#666666;font-size:14px;line-height:1.6;">If you did not request a reset, ignore this email.</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:20px 32px;background-color:#fafafa;border-top:1px solid #eeeeee;text-align:center;">
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Yimaru Academy · All rights reserved</p>
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Rezina · All rights reserved</p>
|
||||
</td></tr>
|
||||
</table></td></tr></table></body></html>$reset_html$,
|
||||
updated_at = NOW()
|
||||
|
|
@ -104,28 +104,28 @@ WHERE slug = 'password_reset';
|
|||
|
||||
UPDATE email_templates SET
|
||||
name = 'Welcome Email',
|
||||
subject = 'Welcome to Yimaru Academy',
|
||||
subject = 'Welcome to Rezina',
|
||||
body_text = 'Hi{{if .FirstName}} {{.FirstName}}{{end}},
|
||||
|
||||
Welcome to Yimaru Academy! Sign in to get started: {{.LoginURL}}',
|
||||
Welcome to Rezina! Sign in to get started: {{.LoginURL}}',
|
||||
body_html = $welcome_html$<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Yimaru Academy</title></head>
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Rezina</title></head>
|
||||
<body style="margin:0;padding:0;background-color:#f4f6fb;font-family:Inter,Roboto,Helvetica,Arial,sans-serif;">
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background-color:#f4f6fb;padding:32px 16px;">
|
||||
<tr><td align="center">
|
||||
<table role="presentation" width="600" cellspacing="0" cellpadding="0" style="max-width:600px;width:100%;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(157,42,131,0.14);">
|
||||
<tr><td style="background:linear-gradient(135deg,#7b1f6e 0%,#9d2a83 52%,#c43a9a 100%);padding:28px 32px;text-align:center;">
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Yimaru Academy</p>
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Rezina</p>
|
||||
<p style="margin:8px 0 0;color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;">Online Learning Platform</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:32px;">
|
||||
<h1 style="margin:0 0 8px;color:#333333;font-size:24px;font-weight:700;">Welcome aboard</h1>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}your Yimaru Academy account is ready. Start learning at your own pace.</p>
|
||||
<p style="margin:0 0 24px;text-align:center;"><a href="{{.LoginURL}}" style="display:inline-block;background-color:#9d2a83;color:#ffffff !important;text-decoration:none;padding:14px 28px;border-radius:8px;font-weight:600;font-size:15px;">Sign in to Yimaru Academy</a></p>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}your Rezina account is ready. Start learning at your own pace.</p>
|
||||
<p style="margin:0 0 24px;text-align:center;"><a href="{{.LoginURL}}" style="display:inline-block;background-color:#9d2a83;color:#ffffff !important;text-decoration:none;padding:14px 28px;border-radius:8px;font-weight:600;font-size:15px;">Sign in to Rezina</a></p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:20px 32px;background-color:#fafafa;border-top:1px solid #eeeeee;text-align:center;">
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Yimaru Academy · All rights reserved</p>
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Rezina · All rights reserved</p>
|
||||
</td></tr>
|
||||
</table></td></tr></table></body></html>$welcome_html$,
|
||||
updated_at = NOW()
|
||||
|
|
@ -135,13 +135,13 @@ UPDATE email_templates SET
|
|||
name = 'Custom Message',
|
||||
body_html = $custom_html$<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Yimaru Academy</title></head>
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Rezina</title></head>
|
||||
<body style="margin:0;padding:0;background-color:#f4f6fb;font-family:Inter,Roboto,Helvetica,Arial,sans-serif;">
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background-color:#f4f6fb;padding:32px 16px;">
|
||||
<tr><td align="center">
|
||||
<table role="presentation" width="600" cellspacing="0" cellpadding="0" style="max-width:600px;width:100%;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(157,42,131,0.14);">
|
||||
<tr><td style="background:linear-gradient(135deg,#7b1f6e 0%,#9d2a83 52%,#c43a9a 100%);padding:28px 32px;text-align:center;">
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Yimaru Academy</p>
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Rezina</p>
|
||||
<p style="margin:8px 0 0;color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;">Online Learning Platform</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:32px;">
|
||||
|
|
@ -149,7 +149,7 @@ UPDATE email_templates SET
|
|||
<div style="margin:0;color:#666666;font-size:15px;line-height:1.6;">{{.Message}}</div>
|
||||
</td></tr>
|
||||
<tr><td style="padding:20px 32px;background-color:#fafafa;border-top:1px solid #eeeeee;text-align:center;">
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Yimaru Academy · All rights reserved</p>
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Rezina · All rights reserved</p>
|
||||
</td></tr>
|
||||
</table></td></tr></table></body></html>$custom_html$,
|
||||
updated_at = NOW()
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ WITH email_ranked AS (
|
|||
)
|
||||
UPDATE users u
|
||||
SET
|
||||
email = 'dedup-' || u.id || '@invalid.yimaru.local',
|
||||
email = 'dedup-' || u.id || '@invalid.rezina.local',
|
||||
status = CASE WHEN u.status = 'ACTIVE' THEN 'DEACTIVATED' ELSE u.status END,
|
||||
updated_at = CURRENT_TIMESTAMP
|
||||
FROM email_ranked r
|
||||
|
|
@ -120,7 +120,7 @@ SET
|
|||
phone_number = NULL,
|
||||
email = COALESCE(
|
||||
NULLIF(TRIM(u.email), ''),
|
||||
'dedup-' || u.id || '@invalid.yimaru.local'
|
||||
'dedup-' || u.id || '@invalid.rezina.local'
|
||||
),
|
||||
status = CASE WHEN u.status = 'ACTIVE' THEN 'DEACTIVATED' ELSE u.status END,
|
||||
updated_at = CURRENT_TIMESTAMP
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ INSERT INTO email_templates (slug, name, subject, body_text, body_html, variable
|
|||
VALUES (
|
||||
'subscription_activated',
|
||||
'Subscription Activated',
|
||||
'Your Yimaru Academy subscription is active',
|
||||
'Your Rezina subscription is active',
|
||||
'Hi{{if .FirstName}} {{.FirstName}}{{end}},
|
||||
|
||||
Your "{{.PlanName}}" {{.PackageLabel}} subscription is now active{{if .ExpiresLabel}} until {{.ExpiresLabel}}{{else if .IsLifetime}} with lifetime access{{end}}.
|
||||
|
|
@ -10,23 +10,23 @@ Your "{{.PlanName}}" {{.PackageLabel}} subscription is now active{{if .ExpiresLa
|
|||
Sign in to start learning: {{.LoginURL}}',
|
||||
$subscription_html$<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Yimaru Academy</title></head>
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Rezina</title></head>
|
||||
<body style="margin:0;padding:0;background-color:#f4f6fb;font-family:Inter,Roboto,Helvetica,Arial,sans-serif;">
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background-color:#f4f6fb;padding:32px 16px;">
|
||||
<tr><td align="center">
|
||||
<table role="presentation" width="600" cellspacing="0" cellpadding="0" style="max-width:600px;width:100%;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(157,42,131,0.14);">
|
||||
<tr><td style="background:linear-gradient(135deg,#7b1f6e 0%,#9d2a83 52%,#c43a9a 100%);padding:28px 32px;text-align:center;">
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Yimaru Academy</p>
|
||||
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Rezina</p>
|
||||
<p style="margin:8px 0 0;color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;">Online Learning Platform</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:32px;">
|
||||
<h1 style="margin:0 0 8px;color:#333333;font-size:24px;font-weight:700;">Subscription active</h1>
|
||||
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}your <strong style="color:#9d2a83;">{{.PlanName}}</strong> {{.PackageLabel}} package is now active.{{if .IsLifetime}} You have lifetime access.{{else if .ExpiresLabel}} It is valid until <strong style="color:#333333;">{{.ExpiresLabel}}</strong>.{{end}}</p>
|
||||
<p style="margin:0 0 24px;text-align:center;"><a href="{{.LoginURL}}" style="display:inline-block;background-color:#9d2a83;color:#ffffff !important;text-decoration:none;padding:14px 28px;border-radius:8px;font-weight:600;font-size:15px;">Start learning</a></p>
|
||||
<p style="margin:24px 0 0;color:#666666;font-size:14px;line-height:1.6;">Thank you for subscribing to Yimaru Academy.</p>
|
||||
<p style="margin:24px 0 0;color:#666666;font-size:14px;line-height:1.6;">Thank you for subscribing to Rezina.</p>
|
||||
</td></tr>
|
||||
<tr><td style="padding:20px 32px;background-color:#fafafa;border-top:1px solid #eeeeee;text-align:center;">
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Yimaru Academy · All rights reserved</p>
|
||||
<p style="margin:0;color:#999999;font-size:12px;">© 2026 Rezina · All rights reserved</p>
|
||||
</td></tr>
|
||||
</table></td></tr></table></body></html>$subscription_html$,
|
||||
'["FirstName", "PlanName", "PackageLabel", "LoginURL", "ExpiresLabel", "IsLifetime"]'::jsonb,
|
||||
|
|
|
|||
8
db/migrations/000112_rezina_email_brand.down.sql
Normal file
8
db/migrations/000112_rezina_email_brand.down.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
-- Restore the previous email branding if this migration is rolled back.
|
||||
UPDATE email_templates
|
||||
SET name = REPLACE(name, 'Rezina', 'Yimaru Academy'),
|
||||
subject = REPLACE(subject, 'Rezina', 'Yimaru Academy'),
|
||||
body_text = REPLACE(body_text, 'Rezina', 'Yimaru Academy'),
|
||||
body_html = REPLACE(body_html, 'Rezina', 'Yimaru Academy'),
|
||||
updated_at = NOW()
|
||||
WHERE slug IN ('otp', 'invitation', 'password_reset', 'welcome', 'custom_message', 'subscription_activated');
|
||||
11
db/migrations/000112_rezina_email_brand.up.sql
Normal file
11
db/migrations/000112_rezina_email_brand.up.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
-- Update system email templates to the Rezina brand for existing installations.
|
||||
UPDATE email_templates
|
||||
SET name = REPLACE(name, 'Yimaru Academy', 'Rezina'),
|
||||
subject = REPLACE(subject, 'Yimaru Academy', 'Rezina'),
|
||||
body_text = REPLACE(body_text, 'Yimaru Academy', 'Rezina'),
|
||||
body_html = REPLACE(body_html, 'Yimaru Academy', 'Rezina'),
|
||||
updated_at = NOW()
|
||||
WHERE name ILIKE '%Yimaru Academy%'
|
||||
OR subject ILIKE '%Yimaru Academy%'
|
||||
OR body_text ILIKE '%Yimaru Academy%'
|
||||
OR body_html ILIKE '%Yimaru Academy%';
|
||||
|
|
@ -2,7 +2,7 @@ version: "3.8"
|
|||
|
||||
services:
|
||||
postgres:
|
||||
container_name: yimaru-backend-postgres-1
|
||||
container_name: rezina-backend-postgres-1
|
||||
image: postgres:16-alpine
|
||||
ports:
|
||||
- "5592:5422"
|
||||
|
|
@ -22,7 +22,7 @@ services:
|
|||
- ./exports:/exports
|
||||
|
||||
pgadmin:
|
||||
container_name: yimaru-pgadmin
|
||||
container_name: rezina-pgadmin
|
||||
image: dpage/pgadmin4:latest
|
||||
restart: always
|
||||
ports:
|
||||
|
|
@ -39,7 +39,7 @@ services:
|
|||
- pgadmin_data:/var/lib/pgadmin
|
||||
|
||||
mongo:
|
||||
container_name: yimaru-mongo
|
||||
container_name: rezina-mongo
|
||||
image: mongo:7.0.11
|
||||
restart: always
|
||||
ports:
|
||||
|
|
@ -58,7 +58,7 @@ services:
|
|||
retries: 5
|
||||
|
||||
minio:
|
||||
container_name: yimaru-minio
|
||||
container_name: rezina-minio
|
||||
image: minio/minio:latest
|
||||
restart: always
|
||||
ports:
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
|||
# Activity Logs — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to integrate the **platform activity log (audit trail)** into the Yimaru admin panel. It covers authentication, RBAC permissions, read-only APIs, filtering, pagination, action/resource catalogs, actor resolution, recommended UI patterns, TypeScript types, and how activity logs relate to other “activity” endpoints on user profiles.
|
||||
This guide documents how to integrate the **platform activity log (audit trail)** into the Rezina admin panel. It covers authentication, RBAC permissions, read-only APIs, filtering, pagination, action/resource catalogs, actor resolution, recommended UI patterns, TypeScript types, and how activity logs relate to other “activity” endpoints on user profiles.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ flowchart LR
|
|||
UserAudit["User audit filter (actor_id)"]
|
||||
end
|
||||
|
||||
subgraph API["Yimaru API"]
|
||||
subgraph API["Rezina API"]
|
||||
ListRoute["GET /activity-logs"]
|
||||
GetRoute["GET /activity-logs/:id"]
|
||||
end
|
||||
|
|
@ -310,7 +310,7 @@ Authorization: Bearer eyJhbG...
|
|||
"actor_id": 7,
|
||||
"actor_role": "ADMIN",
|
||||
"actor_name": "Jane Admin",
|
||||
"actor_email": "jane@yimaru.com",
|
||||
"actor_email": "jane@rezina.com",
|
||||
"actor_kind": "team_member",
|
||||
"action": "FAQ_UPDATED",
|
||||
"resource_type": "FAQ",
|
||||
|
|
@ -362,7 +362,7 @@ Authorization: Bearer <token>
|
|||
"actor_id": 7,
|
||||
"actor_role": "ADMIN",
|
||||
"actor_name": "Jane Admin",
|
||||
"actor_email": "jane@yimaru.com",
|
||||
"actor_email": "jane@rezina.com",
|
||||
"actor_kind": "team_member",
|
||||
"action": "NOTIFICATION_BULK_SENT",
|
||||
"resource_type": "NOTIFICATION",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Admin Subscription Grant / Extend / Cancel — Admin Panel Integration Guide
|
||||
# Admin Subscription Grant / Extend / Cancel — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to integrate **admin-managed learner subscriptions** into the Yimaru admin panel: a **unified grant-or-extend** action (pick a plan), and **cancel**.
|
||||
This guide documents how to integrate **admin-managed learner subscriptions** into the Rezina admin panel: a **unified grant-or-extend** action (pick a plan), and **cancel**.
|
||||
|
||||
**Use this guide when:** building or updating the learner profile "Subscriptions / Billing" section.
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ Admins manage learner access without Chapa/ArifPay checkout via **one** apply en
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Admin as Admin panel
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
participant DB as Postgres
|
||||
participant Notif as Learner notifications
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Bulk & Scheduled Notifications — Integration Guide
|
||||
|
||||
This guide documents how admin clients integrate with the Yimaru backend to send **immediate** or **scheduled** bulk notifications across four channels:
|
||||
This guide documents how admin clients integrate with the Rezina backend to send **immediate** or **scheduled** bulk notifications across four channels:
|
||||
|
||||
| Channel | Value | Endpoint |
|
||||
|---------|-------|----------|
|
||||
|
|
@ -43,7 +43,7 @@ Bulk and single **email** sends support optional **email template** selection (`
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Admin as Admin client
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
participant DB as PostgreSQL
|
||||
participant Worker as Scheduler worker
|
||||
participant Channel as SMS / Email / FCM / WS
|
||||
|
|
@ -291,7 +291,7 @@ Content-Type: application/json
|
|||
|
||||
```json
|
||||
{
|
||||
"message": "Welcome to Yimaru!",
|
||||
"message": "Welcome to Rezina!",
|
||||
"phone_numbers": ["+251911000000"],
|
||||
"scheduled_at": "2026-06-15T09:00:00Z"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Chapa Direct Charge (USSD) — Client App Integration Guide
|
||||
|
||||
This guide documents how to integrate **Chapa Direct Charge** subscription payments into the Yimaru **learner client app** (mobile or web). Direct charge lets users pay with Ethiopian mobile wallets **inside your app** — no browser redirect to Chapa’s hosted checkout page. For Telebirr and similar wallets, the user receives a **USSD push** on their phone and approves the payment there.
|
||||
This guide documents how to integrate **Chapa Direct Charge** subscription payments into the Rezina **learner client app** (mobile or web). Direct charge lets users pay with Ethiopian mobile wallets **inside your app** — no browser redirect to Chapa’s hosted checkout page. For Telebirr and similar wallets, the user receives a **USSD push** on their phone and approves the payment there.
|
||||
|
||||
> **Scope:** Subscription checkout only. Uses `POST /api/v1/payments/chapa/direct` and related endpoints. **Hosted Chapa checkout** (`POST /api/v1/payments/subscribe` with `provider: "CHAPA"`) remains available and unchanged — use it when you want a full payment page with cards and all wallets.
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ This guide covers **Chapa Direct Charge** only.
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant App as Client app
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
participant Chapa as Chapa API
|
||||
participant Wallet as User wallet (Telebirr)
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ sequenceDiagram
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant App as Client app
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
participant Chapa as Chapa API
|
||||
|
||||
App->>API: POST /payments/chapa/direct
|
||||
|
|
@ -132,7 +132,7 @@ Replace `{API_BASE}` with your environment:
|
|||
|
||||
| Environment | Example |
|
||||
|-------------|---------|
|
||||
| Production | `https://api.yimaru.com` |
|
||||
| Production | `https://api.rezina.com` |
|
||||
| Staging | Your staging API host |
|
||||
|
||||
All paths below are prefixed with `/api/v1`.
|
||||
|
|
@ -572,7 +572,7 @@ Invalid or empty phone → `400` with `"phone is required for direct charge"`.
|
|||
## TypeScript types & API client
|
||||
|
||||
```typescript
|
||||
const API_BASE = "https://api.yimaru.com";
|
||||
const API_BASE = "https://api.rezina.com";
|
||||
|
||||
export interface ApiResponse<T> {
|
||||
message: string;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# CSV Export — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to integrate **server-side CSV export** into the Yimaru admin panel. Exports mirror each resource’s **list filters** (same query parameters as the JSON list APIs) and return a downloadable file instead of paginated JSON.
|
||||
This guide documents how to integrate **server-side CSV export** into the Rezina admin panel. Exports mirror each resource’s **list filters** (same query parameters as the JSON list APIs) and return a downloadable file instead of paginated JSON.
|
||||
|
||||
> **Scope:** Tier 1 admin exports — payments, users, subscriptions, activity logs, and team members.
|
||||
> **Related:** List API guides for each resource (e.g. [activity-logs-admin-panel-integration.md](./activity-logs-admin-panel-integration.md)).
|
||||
|
|
@ -71,7 +71,7 @@ flowchart LR
|
|||
BlobDL["Blob download"]
|
||||
end
|
||||
|
||||
subgraph API["Yimaru API"]
|
||||
subgraph API["Rezina API"]
|
||||
ExportRoute["GET .../export"]
|
||||
StreamCSV["StreamCSV helper"]
|
||||
ListSvc["List service + DB"]
|
||||
|
|
|
|||
10
docs/docs.go
10
docs/docs.go
|
|
@ -4868,7 +4868,7 @@ const docTemplate = `{
|
|||
},
|
||||
"/api/v1/payments/arifpay/success": {
|
||||
"get": {
|
||||
"description": "Displays the Yimaru Academy success page after ArifPay redirects the learner back to the backend.",
|
||||
"description": "Displays the Rezina success page after ArifPay redirects the learner back to the backend.",
|
||||
"produces": [
|
||||
"text/html"
|
||||
],
|
||||
|
|
@ -4948,7 +4948,7 @@ const docTemplate = `{
|
|||
},
|
||||
"/api/v1/payments/chapa/success": {
|
||||
"get": {
|
||||
"description": "Displays the Yimaru Academy success page after Chapa redirects the learner to return_url",
|
||||
"description": "Displays the Rezina success page after Chapa redirects the learner to return_url",
|
||||
"produces": [
|
||||
"text/html"
|
||||
],
|
||||
|
|
@ -11672,7 +11672,7 @@ const docTemplate = `{
|
|||
},
|
||||
"/payment/success": {
|
||||
"get": {
|
||||
"description": "Displays the Yimaru Academy success page after Chapa redirects the learner to return_url",
|
||||
"description": "Displays the Rezina success page after Chapa redirects the learner to return_url",
|
||||
"produces": [
|
||||
"text/html"
|
||||
],
|
||||
|
|
@ -15458,8 +15458,8 @@ var SwaggerInfo = &swag.Spec{
|
|||
Host: "",
|
||||
BasePath: "",
|
||||
Schemes: []string{},
|
||||
Title: "Yimaru API",
|
||||
Description: "This is server for Yimaru.",
|
||||
Title: "Rezina API",
|
||||
Description: "This is server for Rezina.",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
LeftDelim: "{{",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# FAQ Admin Panel — Integration Guide
|
||||
|
||||
This guide documents how to integrate the **FAQ management** feature into the Yimaru admin panel. It covers authentication, RBAC permissions, admin CRUD APIs, response shapes, validation, UI recommendations, and how admin content relates to the public help center.
|
||||
This guide documents how to integrate the **FAQ management** feature into the Rezina admin panel. It covers authentication, RBAC permissions, admin CRUD APIs, response shapes, validation, UI recommendations, and how admin content relates to the public help center.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ flowchart LR
|
|||
Preview[Preview public view]
|
||||
end
|
||||
|
||||
subgraph API["Yimaru API"]
|
||||
subgraph API["Rezina API"]
|
||||
AdminRoutes["/admin/faqs CRUD"]
|
||||
PublicRoutes["/faqs read-only"]
|
||||
end
|
||||
|
|
@ -711,7 +711,7 @@ export interface UpdateFAQInput {
|
|||
### Example client (fetch)
|
||||
|
||||
```typescript
|
||||
const API_BASE = import.meta.env.VITE_API_BASE_URL; // e.g. https://api.yimaru.com
|
||||
const API_BASE = import.meta.env.VITE_API_BASE_URL; // e.g. https://api.rezina.com
|
||||
|
||||
function authHeaders(token: string): HeadersInit {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# File Upload — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how the Yimaru admin panel should upload **images, audio, PDFs, and videos** using **direct-to-storage uploads** with accurate client-side progress tracking.
|
||||
This guide documents how the Rezina admin panel should upload **images, audio, PDFs, and videos** using **direct-to-storage uploads** with accurate client-side progress tracking.
|
||||
|
||||
**Use this guide instead of `POST /api/v1/files/upload`.** That legacy endpoint accepts `multipart/form-data` and streams the entire file through the API server. The browser cannot report true upload progress for that path in a meaningful way, and large files (especially video) add load and timeout risk on the backend.
|
||||
|
||||
|
|
@ -43,10 +43,10 @@ The admin panel uploads files when creating or editing content: lesson media, pe
|
|||
|
||||
The backend exposes two **progress-friendly** upload paths:
|
||||
|
||||
1. **MinIO presigned upload** — three-step flow for static files stored in the Yimaru MinIO bucket.
|
||||
1. **MinIO presigned upload** — three-step flow for static files stored in the Rezina MinIO bucket.
|
||||
2. **Vimeo TUS upload** — two-step flow (create slot + client TUS upload) for video hosted on Vimeo.
|
||||
|
||||
Both flows upload **directly from the browser to the storage provider**. The Yimaru API only:
|
||||
Both flows upload **directly from the browser to the storage provider**. The Rezina API only:
|
||||
|
||||
- Authenticates the admin user
|
||||
- Issues upload credentials (presigned URL or TUS upload link)
|
||||
|
|
@ -93,7 +93,7 @@ flowchart TB
|
|||
Form[Content form save]
|
||||
end
|
||||
|
||||
subgraph API["Yimaru API (authenticated)"]
|
||||
subgraph API["Rezina API (authenticated)"]
|
||||
Presign["POST /files/presign-upload"]
|
||||
Complete["POST /files/complete-upload"]
|
||||
TusCreate["POST /vimeo/uploads/tus"]
|
||||
|
|
@ -470,7 +470,7 @@ Save **`vimeo_id`** and **`upload_link`** immediately. The upload link is single
|
|||
|
||||
### Step 2 — Upload file with TUS (progress tracked here)
|
||||
|
||||
Upload **directly to `upload_link`** using a TUS 1.0.0 client. Do not send the video bytes to the Yimaru API.
|
||||
Upload **directly to `upload_link`** using a TUS 1.0.0 client. Do not send the video bytes to the Rezina API.
|
||||
|
||||
**Recommended library:** [`tus-js-client`](https://github.com/tus/tus-js-client) (browser).
|
||||
|
||||
|
|
@ -1104,14 +1104,14 @@ Always surface both `message` and `error` from API JSON when present.
|
|||
|
||||
### MinIO CORS (required for browser PUT)
|
||||
|
||||
The admin panel origin (e.g. `https://admin.yimaru.com`) must be allowed to **`PUT`** to the MinIO endpoint host embedded in `upload_url`.
|
||||
The admin panel origin (e.g. `https://admin.rezina.com`) must be allowed to **`PUT`** to the MinIO endpoint host embedded in `upload_url`.
|
||||
|
||||
Example MinIO CORS rule (adjust origins):
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"AllowedOrigin": ["https://admin.yimaru.com", "http://localhost:5173"],
|
||||
"AllowedOrigin": ["https://admin.rezina.com", "http://localhost:5173"],
|
||||
"AllowedMethod": ["GET", "PUT", "HEAD"],
|
||||
"AllowedHeader": ["*"],
|
||||
"ExposeHeader": ["ETag"],
|
||||
|
|
@ -1124,7 +1124,7 @@ Without this, step 2 fails in the browser with a CORS error even though presign
|
|||
|
||||
### Vimeo TUS
|
||||
|
||||
Vimeo upload endpoints accept browser TUS from public origins; no Yimaru MinIO CORS applies. Ensure outbound HTTPS to `*.upload.vimeo.com` is not blocked by corporate firewalls.
|
||||
Vimeo upload endpoints accept browser TUS from public origins; no Rezina MinIO CORS applies. Ensure outbound HTTPS to `*.upload.vimeo.com` is not blocked by corporate firewalls.
|
||||
|
||||
### Environment variables (backend ops)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Generate Yimaru Backend Developer Documentation (.docx)."""
|
||||
"""Generate Rezina Backend Developer Documentation (.docx)."""
|
||||
|
||||
from datetime import date
|
||||
from pathlib import Path
|
||||
|
|
@ -10,7 +10,7 @@ from docx.enum.text import WD_ALIGN_PARAGRAPH, WD_LINE_SPACING
|
|||
from docx.oxml.ns import qn
|
||||
from docx.shared import Inches, Pt, RGBColor
|
||||
|
||||
OUT = Path(__file__).resolve().parent / "Yimaru_Backend_Developer_Documentation.docx"
|
||||
OUT = Path(__file__).resolve().parent / "Rezina_Backend_Developer_Documentation.docx"
|
||||
|
||||
|
||||
def set_run_font(run, name="Calibri", size=11, bold=False, italic=False, color=None):
|
||||
|
|
@ -117,7 +117,7 @@ def build():
|
|||
doc.add_paragraph()
|
||||
add_para(
|
||||
doc,
|
||||
"Yimaru Backend",
|
||||
"Rezina Backend",
|
||||
size=28,
|
||||
bold=True,
|
||||
align=WD_ALIGN_PARAGRAPH.CENTER,
|
||||
|
|
@ -133,7 +133,7 @@ def build():
|
|||
)
|
||||
add_para(
|
||||
doc,
|
||||
"A practical guide for engineers working on the Yimaru Academy API",
|
||||
"A practical guide for engineers working on the Rezina API",
|
||||
size=12,
|
||||
italic=True,
|
||||
align=WD_ALIGN_PARAGRAPH.CENTER,
|
||||
|
|
@ -141,17 +141,17 @@ def build():
|
|||
)
|
||||
add_para(
|
||||
doc,
|
||||
f"Version aligned with repository module Yimaru-Backend (Go 1.25)\n"
|
||||
f"Version aligned with repository module Rezina-Backend (Go 1.25)\n"
|
||||
f"Document generated {date.today().isoformat()}\n"
|
||||
f"Audience: Backend developers & maintainers\n"
|
||||
f"Source: https://gitea.yaltopia.com/Yimaru/Yimaru-BackEnd.git",
|
||||
f"Source: https://gitea.yaltopia.com/Rezina/Rezina-BackEnd.git",
|
||||
size=10,
|
||||
align=WD_ALIGN_PARAGRAPH.CENTER,
|
||||
space_after=12,
|
||||
)
|
||||
add_para(
|
||||
doc,
|
||||
"Internal / proprietary — Yaltopia Tech · Yimaru Academy",
|
||||
"Internal / proprietary — Yaltopia Tech · Rezina",
|
||||
size=9,
|
||||
italic=True,
|
||||
align=WD_ALIGN_PARAGRAPH.CENTER,
|
||||
|
|
@ -162,7 +162,7 @@ def build():
|
|||
add_heading_custom(doc, "1. Introduction", 1)
|
||||
add_para(
|
||||
doc,
|
||||
"If you are opening this document because you just joined the Yimaru backend team "
|
||||
"If you are opening this document because you just joined the Rezina backend team "
|
||||
"(or you are returning after a few months away), welcome. The codebase is larger than "
|
||||
"it looks at first glance: one Fiber HTTP server, two content trees (Learn English LMS "
|
||||
"and exam-prep / Duolingo–IELTS), a full subscription and payments stack, team RBAC for "
|
||||
|
|
@ -185,7 +185,7 @@ def build():
|
|||
add_bullets(
|
||||
doc,
|
||||
[
|
||||
"Admin panel: https://gitea.yaltopia.com/Yimaru/Yimaru-Admin.git (consumes /api/v1)",
|
||||
"Admin panel: https://gitea.yaltopia.com/Rezina/Rezina-Admin.git (consumes /api/v1)",
|
||||
"Swagger UI on a running server: /swagger/index.html",
|
||||
"Feature contracts for admin: docs/*-admin-panel-integration.md in this repo",
|
||||
"README.md at the repo root (quick start & env tables)",
|
||||
|
|
@ -195,7 +195,7 @@ def build():
|
|||
add_heading_custom(doc, "1.1 What this service is responsible for", 2)
|
||||
add_para(
|
||||
doc,
|
||||
"Yimaru-Backend is the system of record for learner accounts, learning content, "
|
||||
"Rezina-Backend is the system of record for learner accounts, learning content, "
|
||||
"practice assessments, subscription entitlements, payment attempts, team (staff) "
|
||||
"accounts, RBAC permissions, operational notifications, support issues, FAQs, ratings, "
|
||||
"and the analytics dashboard used by admins. Mobile apps and the admin SPA are clients; "
|
||||
|
|
@ -319,7 +319,7 @@ Catalog courses
|
|||
add_numbered(
|
||||
doc,
|
||||
[
|
||||
"Clone https://gitea.yaltopia.com/Yimaru/Yimaru-BackEnd.git and check out production (or the branch your team uses).",
|
||||
"Clone https://gitea.yaltopia.com/Rezina/Rezina-BackEnd.git and check out production (or the branch your team uses).",
|
||||
"Copy or create .env. Ask a teammate for a working local template—never invent payment webhook secrets.",
|
||||
"make db-up — brings up Postgres, runs migrations container, starts Mongo.",
|
||||
"Optionally make seed_data and/or make seed_dev_data.",
|
||||
|
|
@ -726,7 +726,7 @@ Catalog courses
|
|||
add_heading_custom(doc, "16. Closing notes", 1)
|
||||
add_para(
|
||||
doc,
|
||||
"Yimaru’s backend is not a toy CRUD service. Learners depend on entitlements being "
|
||||
"Rezina’s backend is not a toy CRUD service. Learners depend on entitlements being "
|
||||
"correct; teachers and content managers depend on reorder and publish semantics staying "
|
||||
"stable; finance depends on payment webhooks being trustworthy. When in doubt, add a "
|
||||
"test, write the integration note, and ask in review before merging something that "
|
||||
|
|
@ -740,7 +740,7 @@ Catalog courses
|
|||
)
|
||||
add_para(
|
||||
doc,
|
||||
"— Yaltopia engineering, for Yimaru Academy backend developers",
|
||||
"— Yaltopia engineering, for Rezina backend developers",
|
||||
space_before=16,
|
||||
italic=True,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Initial Placement Assessment — Client App Integration Guide
|
||||
|
||||
This guide documents how to integrate the **initial placement assessment** into the Yimaru **learner mobile app** (iOS / Android / React Native / Flutter). The feature runs a **progressive, one-set-per-CEFR-level** flow: the learner starts at **A1**, answers that level’s published set, and advances to the next level only when they meet that level’s **pass score**. Failing a level (or running out of published higher sets) finalizes `knowledge_level` as the highest level already passed (A1 if none).
|
||||
This guide documents how to integrate the **initial placement assessment** into the Rezina **learner mobile app** (iOS / Android / React Native / Flutter). The feature runs a **progressive, one-set-per-CEFR-level** flow: the learner starts at **A1**, answers that level’s published set, and advances to the next level only when they meet that level’s **pass score**. Failing a level (or running out of published higher sets) finalizes `knowledge_level` as the highest level already passed (A1 if none).
|
||||
|
||||
> **Scope:** Learner-facing placement flow only. Admin configuration (per-level sets, questions, pass thresholds) is managed in **Yimaru Admin** under **Content → Initial assessment** and is out of scope for the mobile client.
|
||||
> **Scope:** Learner-facing placement flow only. Admin configuration (per-level sets, questions, pass thresholds) is managed in **Rezina Admin** under **Content → Initial assessment** and is out of scope for the mobile client.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ Before the app can run a successful placement flow:
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant App as Mobile app
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
participant DB as Postgres
|
||||
|
||||
App->>API: GET /user/user-profile (auth)
|
||||
|
|
|
|||
137
docs/initial-assessment-question-writing-guide.md
Normal file
137
docs/initial-assessment-question-writing-guide.md
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
# Writing questions for the initial assessment
|
||||
|
||||
This guide is for anyone building or reviewing the question sets used to place a learner at a starting English level. The aim is to get a useful estimate of what a learner can do, not to catch them out or produce a long exam.
|
||||
|
||||
## How the placement assessment works
|
||||
|
||||
The assessment is organized into separate question sets for CEFR levels A1 through C2. A learner works through the levels progressively. The system grades a level set against its configured pass threshold: a pass moves the learner on to the next level, while a non-pass ends the progression and records the resulting level. As a result, each level set needs enough questions to give a stable signal, and the questions should genuinely reflect that level.
|
||||
|
||||
The backend currently auto-grades `MCQ`, `TRUE_FALSE`, `SHORT_ANSWER`, and supported `DYNAMIC` questions whose response contains multiple-choice or option slots. `AUDIO` and other dynamic response types are returned to the learner, but are skipped in the placement score. A set with no gradable questions cannot be submitted successfully. This distinction matters: a question can be useful in a broader language course but still contribute nothing to placement as the feature currently works.
|
||||
|
||||
## Recommended mix
|
||||
|
||||
Use a mix of the following, weighted toward questions that can be marked consistently:
|
||||
|
||||
| Format | Best use in placement | Scoring status |
|
||||
|---|---|---|
|
||||
| Multiple choice (`MCQ`) | Vocabulary, grammar in context, reading comprehension | Auto-graded |
|
||||
| True/false (`TRUE_FALSE`) | A small number of checks against a short text or dialogue | Auto-graded; use sparingly |
|
||||
| Short answer (`SHORT_ANSWER`) | A word, phrase, or tightly constrained form with known acceptable answers | Auto-graded against configured answers |
|
||||
| Dynamic multiple choice / option | Builder-based versions of selected-answer questions, such as a cloze passage with selectable answers | Auto-graded when the response slot is supported |
|
||||
| Audio or open response | Listening or speaking evidence, if useful to the learning program | Currently not included in placement scoring |
|
||||
|
||||
For a first version, make multiple choice the backbone. Add short answers only where the accepted response can be defined without ambiguity. Use dynamic item types only after confirming that their answer format is one the placement grader supports. Do not count on audio, free writing, speaking, matching, ordering, or other builder formats to affect a learner's placement result unless grading support has been added and verified.
|
||||
|
||||
True/false is easy to answer by guessing, so it should not dominate a set. If used, tie it to a short passage or exchange and make the statement test understanding rather than a tiny wording detail.
|
||||
|
||||
## What to assess
|
||||
|
||||
### Vocabulary
|
||||
|
||||
Test whether the learner can understand a word in a realistic sentence or exchange. Avoid isolated definitions when context can show how the word is used. At early levels, common everyday words are appropriate; at higher levels, test nuance, collocation, and meaning in context.
|
||||
|
||||
### Grammar
|
||||
|
||||
Ask learners to choose or supply a form that makes sense in a sentence or short conversation. Cover a range of useful structures at each level. Avoid questions where two answers are acceptable in ordinary English, even if one is the answer key you had in mind.
|
||||
|
||||
### Reading
|
||||
|
||||
Use short, level-appropriate passages such as a message, notice, short story, or practical instruction. Ask about the main point, a stated detail, or a simple inference. Keep the passage and question together so the answer does not depend on outside knowledge.
|
||||
|
||||
### Listening
|
||||
|
||||
Listening can add valuable evidence, but audio questions currently do not count toward the automatic placement score. They may be included for a separate, non-scored experience, but should not be used to determine the level until the scoring path supports them. If listening is made gradable later, use clear recordings, provide any necessary replay rules, and test comprehension rather than audio quality or accent familiarity.
|
||||
|
||||
### Writing and speaking
|
||||
|
||||
Open writing and speaking can reveal more than selected-answer questions, especially at higher levels. They also need rubrics and usually human review. The current placement score does not grade open-ended responses. Treat them as separate diagnostic evidence unless a reliable scoring process is implemented.
|
||||
|
||||
## Build a clear progression across CEFR levels
|
||||
|
||||
Each published set should represent its own CEFR band, not just be a harder copy of the previous one. Keep instructions and language accessible at the level being assessed. A learner should be able to understand what the question asks even when they do not know the answer.
|
||||
|
||||
- **A1:** familiar people, places, routines, basic needs, simple present forms, common words, and very short messages.
|
||||
- **A2:** everyday exchanges, routine past and future references, simple descriptions, and short practical texts.
|
||||
- **B1:** familiar topics and experiences, connected text, opinions with simple reasons, and common less-predictable situations.
|
||||
- **B2:** more detailed explanations, main ideas and implications in longer texts, and a broader range of vocabulary and structures.
|
||||
- **C1:** nuanced meaning, tone, argument structure, less predictable language, and demanding but still fair texts.
|
||||
- **C2:** precise interpretation, subtle distinctions, complex arguments, and flexible command of language. Avoid making specialist subject knowledge the hidden test.
|
||||
|
||||
These are drafting cues, not a substitute for a CEFR-aligned review. Have a language educator check that the vocabulary, text length, and task demand fit the intended level.
|
||||
|
||||
## Writing good multiple-choice items
|
||||
|
||||
1. Put one clear task in the prompt. State the context needed to answer it.
|
||||
2. Make sure exactly one option is correct, unless the interface and scoring are deliberately configured for multiple correct selections.
|
||||
3. Write plausible distractors based on likely learner errors. Avoid joke answers or options that are obviously unrelated.
|
||||
4. Keep options similar in length and grammatical form. Do not let the correct answer stand out by style.
|
||||
5. Avoid “all of the above,” “none of the above,” tricky negatives, and clues copied from the prompt.
|
||||
6. Check that no distractor is also acceptable in common usage or a different reasonable interpretation of the context.
|
||||
7. Keep each question independent unless a shared passage is intentionally used. One wrong answer should not give away or determine another.
|
||||
|
||||
**Example (A2 vocabulary)**
|
||||
|
||||
> The bus leaves at 8:15. We should arrive at the station by 8:00 so we have time to ___ our tickets.
|
||||
>
|
||||
> A. buy
|
||||
> B. borrow
|
||||
> C. invite
|
||||
> D. explain
|
||||
|
||||
The context makes the intended meaning clear, and the distractors are possible English verbs without being equally suitable answers.
|
||||
|
||||
## Writing short-answer items
|
||||
|
||||
Short-answer questions work best when the response is brief and predictable: a word, a form, or a short phrase. The system compares the learner's response with the acceptable answers configured for the question. It is not a substitute for assessing an open paragraph.
|
||||
|
||||
- List ordinary variants that should receive credit, such as a common spelling or contraction, where appropriate.
|
||||
- Keep the expected response narrow enough that a correct answer can be recognized consistently.
|
||||
- Avoid prompts that could reasonably be answered in several different ways unless every valid form is entered as acceptable.
|
||||
- Check capitalization, punctuation, and spacing behavior before relying on a distinction. Prefer not to make those details the point of the item.
|
||||
- Do not use short answer for free translation or open writing unless the accepted-answer list can cover legitimate responses fairly.
|
||||
|
||||
## Dynamic questions
|
||||
|
||||
The question builder supports many stimulus and response components, but the placement grader supports only specific response patterns. A dynamic question is not automatically gradable just because it can be created or displayed in the admin panel. For placement, use dynamic multiple-choice or option responses only when their configuration and submitted answer are supported by the grader. Confirm this with a representative authored item before building a whole level set around it.
|
||||
|
||||
Formats such as audio response, sequence ordering, matching, label selection, or open text may be useful elsewhere in the LMS. Do not assume they contribute to placement until the grading implementation explicitly handles them.
|
||||
|
||||
## Balance, length, and points
|
||||
|
||||
Keep each level set short enough that a learner can finish without fatigue. Include enough questions to sample more than one skill area, but do not inflate the set with near-duplicates. A practical starting point is around 10–15 gradable questions per level, adjusted after educators review the learner experience and score stability.
|
||||
|
||||
Use points consistently. If a question has no positive point value, the grader treats it as worth one point. For an initial version, giving each question one point makes the result easier to explain and avoids accidental weighting. If some items receive more weight, document why and check that the threshold still produces sensible outcomes.
|
||||
|
||||
Mix task types and content areas, but do not let a single unfamiliar topic decide the result. For example, a learner's knowledge of a specialized sport or workplace should not determine their English level.
|
||||
|
||||
## Common problems to catch before publishing
|
||||
|
||||
- A set contains only questions the placement grader skips.
|
||||
- The correct option is exposed by length, grammar, or a repeated phrase.
|
||||
- More than one answer is defensible, or the answer key is wrong.
|
||||
- A short-answer key omits common valid forms.
|
||||
- The question tests cultural or specialist knowledge instead of English ability.
|
||||
- Several questions test the same narrow grammar point while other useful abilities are absent.
|
||||
- Reading text is far above the level even though the questions are labeled for a lower band.
|
||||
- A question depends on information not included in the prompt or passage.
|
||||
- A dynamic question was previewed in the builder but never checked through the placement submission and scoring flow.
|
||||
- A set is published before confirming that it has at least one gradable question; in practice, all intended scored questions should be gradable.
|
||||
|
||||
## Review checklist
|
||||
|
||||
Before publishing a level set, confirm that:
|
||||
|
||||
- The set is labeled with the intended CEFR level (A1–C2).
|
||||
- Its questions are appropriate to that level and cover a reasonable range of language use.
|
||||
- Every scored item has one unambiguous answer key or an adequate list of acceptable short answers.
|
||||
- Question wording and answer options have been proofread by someone other than the author.
|
||||
- Correct answers are not visible to learners in the question response.
|
||||
- Every question intended to affect placement uses a currently auto-graded format.
|
||||
- A sample submission produces the expected score and pass/fail progression for the configured threshold.
|
||||
- Unscored diagnostic items are clearly understood to be excluded from the placement result.
|
||||
|
||||
## Suggested authoring workflow
|
||||
|
||||
Draft the set in a document first. For each item, record its target level, skill or language point, question format, correct answer, and reason the distractors are plausible. Have a second reviewer check the answer key and level. Enter the questions into the matching `INITIAL_ASSESSMENT` set, preview them as a learner, and verify a sample submission end to end. Revise items that are confusing or too easy to guess before publishing.
|
||||
|
||||
The strongest placement set is not the one with the most elaborate question formats. It is the one whose questions are clear, level-appropriate, gradable, and broad enough to give a dependable picture of the learner's English.
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
# Yimaru Backend — Technical Overview
|
||||
# Rezina Backend — Technical Overview
|
||||
|
||||
Technical briefing for engineers, architects, or integrators evaluating or working on the **Yimaru Backend API**.
|
||||
Technical briefing for engineers, architects, or integrators evaluating or working on the **Rezina Backend API**.
|
||||
|
||||
> **Setup & ops:** [README](../README.md)
|
||||
> **OpenAPI:** `/swagger/index.html` when the server is running
|
||||
> **Production base:** `https://api.yimaruacademy.com/api/v1`
|
||||
> **Production base:** `https://api.rezinaacademy.com/api/v1`
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ A single **Go monolith** exposing REST JSON at `/api/v1`. It is the system of re
|
|||
| Consumer | Auth | Primary use |
|
||||
|----------|------|-------------|
|
||||
| iOS / Android learner apps | Learner JWT | Content delivery, progress, checkout |
|
||||
| [Yimaru Admin](https://gitea.yaltopia.com/Yimaru/Yimaru-Admin) | Team JWT + RBAC | CRUD, analytics, bulk notify, exports |
|
||||
| [Rezina Admin](https://gitea.yaltopia.com/Rezina/Rezina-Admin) | Team JWT + RBAC | CRUD, analytics, bulk notify, exports |
|
||||
| Web checkout (Vite SPA) | Learner JWT | Hosted Chapa subscribe flow |
|
||||
|
||||
There is **no separate BFF**. Clients talk directly to this API.
|
||||
|
|
@ -32,7 +32,7 @@ flowchart LR
|
|||
Web[Web checkout]
|
||||
end
|
||||
|
||||
API[Yimaru API<br/>Fiber /api/v1]
|
||||
API[Rezina API<br/>Fiber /api/v1]
|
||||
|
||||
subgraph persistence [Persistence]
|
||||
PG[(PostgreSQL)]
|
||||
|
|
@ -344,4 +344,4 @@ Optional deep dive: open `CompletePractice` handler → progress service → mig
|
|||
|
||||
## License
|
||||
|
||||
Proprietary — Yaltopia / Yimaru Academy. Internal use only unless otherwise licensed.
|
||||
Proprietary — Yaltopia / Rezina. Internal use only unless otherwise licensed.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# LMS Personas — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to integrate the **LMS persona catalog** into the Yimaru admin panel. Personas are coach/character profiles (name, description, avatar, gender) stored centrally and linked to **practice shells** in Learn English (LMS) and exam-prep via `persona_id`.
|
||||
This guide documents how to integrate the **LMS persona catalog** into the Rezina admin panel. Personas are coach/character profiles (name, description, avatar, gender) stored centrally and linked to **practice shells** in Learn English (LMS) and exam-prep via `persona_id`.
|
||||
|
||||
> **Naming note:** This feature is **`/api/v1/personas`** (catalog rows in `lms_personas`). It is **not** the same as **question-set user personas** (`/question-sets/:id/personas`), which assign real users to a question set for role-play scenarios. Both are covered below; the admin **Personas** menu usually means the catalog.
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ flowchart LR
|
|||
PracticeEditor[Practice editor persona picker]
|
||||
end
|
||||
|
||||
subgraph API["Yimaru API"]
|
||||
subgraph API["Rezina API"]
|
||||
PersonaRoutes["/api/v1/personas CRUD"]
|
||||
LmsPractice["/api/v1/practices*"]
|
||||
EpPractice["/api/v1/exam-prep/practices*"]
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ An unlinked practice (`parents: null`) is valid for admins but **will not appear
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant UI as Admin panel
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
|
||||
Note over UI,API: Optional — create question set first
|
||||
UI->>API: POST /question-sets
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Practice Multi-Parent Links — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to update the Yimaru **admin panel practice creation and editing** flow for **multi-parent LMS practices**. A single practice can now be linked to **multiple** courses, modules, lessons, or any combination of those hierarchy nodes.
|
||||
This guide documents how to update the Rezina **admin panel practice creation and editing** flow for **multi-parent LMS practices**. A single practice can now be linked to **multiple** courses, modules, lessons, or any combination of those hierarchy nodes.
|
||||
|
||||
> **Scope:** LMS (`/api/v1/practices`) only. **Exam-prep** practices are unchanged — they still attach to exactly one `unit_module_lesson_id`.
|
||||
>
|
||||
|
|
@ -151,7 +151,7 @@ flowchart TB
|
|||
QuestionEditor[Question editor]
|
||||
end
|
||||
|
||||
subgraph API["Yimaru API"]
|
||||
subgraph API["Rezina API"]
|
||||
PostPractice["POST /practices"]
|
||||
PutParents["PUT /practices/:id/parents"]
|
||||
GetFull["GET /practices/:id/full"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Practice Per-Parent Unlink — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to integrate the **per-parent unlink** API into the Yimaru **admin panel**. Content editors can remove a single course, module, lesson, unit, or catalog-course link from a practice **without** sending the full replacement `parents` array and **without** deleting the practice shell or its questions.
|
||||
This guide documents how to integrate the **per-parent unlink** API into the Rezina **admin panel**. Content editors can remove a single course, module, lesson, unit, or catalog-course link from a practice **without** sending the full replacement `parents` array and **without** deleting the practice shell or its questions.
|
||||
|
||||
> **Scope:** Both **LMS** (`/api/v1/practices`) and **exam-prep** (`/api/v1/exam-prep/practices`).
|
||||
>
|
||||
|
|
@ -86,7 +86,7 @@ flowchart LR
|
|||
Confirm["Confirm dialog"]
|
||||
end
|
||||
|
||||
subgraph API["Yimaru API"]
|
||||
subgraph API["Rezina API"]
|
||||
DelLMS["DELETE /practices/:id/parents/:kind/:parentId"]
|
||||
DelEP["DELETE /exam-prep/practices/:id/parents/:kind/:parentId"]
|
||||
Put["PUT .../parents"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Practice Question Associations — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to integrate **question associations** into the Yimaru admin panel practice authoring flow. Associations let content authors group questions into **sequential sections** within a practice. Learners must complete earlier sections (in `display_order`) before later ones unlock.
|
||||
This guide documents how to integrate **question associations** into the Rezina admin panel practice authoring flow. Associations let content authors group questions into **sequential sections** within a practice. Learners must complete earlier sections (in `display_order`) before later ones unlock.
|
||||
|
||||
> **Scope:** This feature adds `associated_question_id` on question set membership (`question_set_items`). It works alongside existing `display_order`. There is **no server-side per-question progress table** — the API returns `prerequisite_question_ids` so the **learner app** (or admin preview) can gate access client-side.
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ flowchart TB
|
|||
SaveBtn[Save practice]
|
||||
end
|
||||
|
||||
subgraph API["Yimaru API"]
|
||||
subgraph API["Rezina API"]
|
||||
GetFull["GET /practices/:id/full"]
|
||||
PutFull["PUT /practices/:id/full"]
|
||||
GetEpFull["GET /exam-prep/practices/:id/full"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Practice Stimulus Blocks — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to integrate **practice-level shared stimulus blocks** into the Yimaru admin panel practice authoring flow. Stimulus blocks let authors define **one shared passage, audio clip, or instruction set** that multiple dynamic questions in the same practice can reference — the primary use case is **IELTS-style listening/reading sections** where several questions share a single stimulus.
|
||||
This guide documents how to integrate **practice-level shared stimulus blocks** into the Rezina admin panel practice authoring flow. Stimulus blocks let authors define **one shared passage, audio clip, or instruction set** that multiple dynamic questions in the same practice can reference — the primary use case is **IELTS-style listening/reading sections** where several questions share a single stimulus.
|
||||
|
||||
> **Scope (Phase 1):** Blocks live on the **practice** (`practice_stimulus_blocks`), not on global question-type definition groups. Questions link via `stimulus_block_key` on set membership (`question_set_items`). The API returns both the **stored** per-question `dynamic_payload` and a computed **`effective_dynamic_payload`** (block stimulus + question stimulus merged). Use `authoring_profile` on the practice shell to switch admin UI modes (`STANDALONE` vs `IELTS_SHARED_STIMULUS`).
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ flowchart TB
|
|||
SaveBtn[Save practice]
|
||||
end
|
||||
|
||||
subgraph API["Yimaru API"]
|
||||
subgraph API["Rezina API"]
|
||||
GetFull["GET /practices/:id/full"]
|
||||
PutFull["PUT /practices/:id/full"]
|
||||
GetEpFull["GET /exam-prep/practices/:id/full"]
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ erDiagram
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant UI as Admin panel
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
|
||||
UI->>API: POST /questions/type-definition-groups { name }
|
||||
API-->>UI: 201 { id: 1, name, ... }
|
||||
|
|
@ -123,7 +123,7 @@ sequenceDiagram
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant UI as Admin panel
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
|
||||
UI->>API: GET /questions/type-definitions/42
|
||||
API-->>UI: 200 { ID: 42, group_ids: [1], ... }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Question Type Definition — Practices List Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to integrate **`GET /api/v1/questions/type-definitions/:id/practices`** into the Yimaru **admin panel**. Use it for the **“Practices using this definition”** modal on the Question types page: list every LMS and exam-prep practice whose question set contains at least one non-archived question of that type, show where each practice is attached in the hierarchy, and link editors into the correct practice shell.
|
||||
This guide documents how to integrate **`GET /api/v1/questions/type-definitions/:id/practices`** into the Rezina **admin panel**. Use it for the **“Practices using this definition”** modal on the Question types page: list every LMS and exam-prep practice whose question set contains at least one non-archived question of that type, show where each practice is attached in the hierarchy, and link editors into the correct practice shell.
|
||||
|
||||
> **Scope:** Admin read-only listing from question type definitions. Practice create/edit, parent attach/detach, and question authoring are covered in related guides.
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Ratings & App Reviews — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to integrate **ratings and app reviews** into the Yimaru admin panel. Learners submit star ratings and optional text reviews from the mobile/web app; the admin panel **monitors and analyzes** that feedback.
|
||||
This guide documents how to integrate **ratings and app reviews** into the Rezina admin panel. Learners submit star ratings and optional text reviews from the mobile/web app; the admin panel **monitors and analyzes** that feedback.
|
||||
|
||||
> **Important:** There are **no** dedicated `/api/v1/admin/ratings*` routes today. Admin features use the shared authenticated **`/api/v1/ratings*`** endpoints with staff RBAC permissions. Submission and deletion are **learner-scoped** (own rating only).
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ flowchart LR
|
|||
UserLink[User profile lookup]
|
||||
end
|
||||
|
||||
subgraph API["Yimaru API"]
|
||||
subgraph API["Rezina API"]
|
||||
RatingsRoutes["/api/v1/ratings*"]
|
||||
UserRoutes["/api/v1/user/single/:id"]
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Select Missing Words & Sequence Order — Admin Panel Integration Guide
|
||||
|
||||
This guide explains how to **render, edit, validate, and serialize** the dynamic question builder components **`SELECT_MISSING_WORDS`** and **`SEQUENCE_ORDER`** in the Yimaru admin panel.
|
||||
This guide explains how to **render, edit, validate, and serialize** the dynamic question builder components **`SELECT_MISSING_WORDS`** and **`SEQUENCE_ORDER`** in the Rezina admin panel.
|
||||
|
||||
It is written to match the **existing admin UI patterns** already used for:
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ in the restricted `plan_cleanup_000110` schema.
|
|||
3. Execute with psql, stopping on any error:
|
||||
|
||||
```powershell
|
||||
psql "$env:DB_URL" -X -v ON_ERROR_STOP=1 -c "SET yimaru.approve_plan_consolidation = 'yes'" -f db/maintenance/consolidate_subscription_plans_before_000110.sql
|
||||
psql "$env:DB_URL" -X -v ON_ERROR_STOP=1 -c "SET rezina.approve_plan_consolidation = 'yes'" -f db/maintenance/consolidate_subscription_plans_before_000110.sql
|
||||
```
|
||||
|
||||
4. Apply migrations 110 and 111 through the normal migration runner. The repair
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "This is server for Yimaru.",
|
||||
"title": "Yimaru API",
|
||||
"description": "This is server for Rezina.",
|
||||
"title": "Rezina API",
|
||||
"termsOfService": "http://swagger.io/terms/",
|
||||
"contact": {
|
||||
"name": "API Support",
|
||||
|
|
@ -4860,7 +4860,7 @@
|
|||
},
|
||||
"/api/v1/payments/arifpay/success": {
|
||||
"get": {
|
||||
"description": "Displays the Yimaru Academy success page after ArifPay redirects the learner back to the backend.",
|
||||
"description": "Displays the Rezina success page after ArifPay redirects the learner back to the backend.",
|
||||
"produces": [
|
||||
"text/html"
|
||||
],
|
||||
|
|
@ -4940,7 +4940,7 @@
|
|||
},
|
||||
"/api/v1/payments/chapa/success": {
|
||||
"get": {
|
||||
"description": "Displays the Yimaru Academy success page after Chapa redirects the learner to return_url",
|
||||
"description": "Displays the Rezina success page after Chapa redirects the learner to return_url",
|
||||
"produces": [
|
||||
"text/html"
|
||||
],
|
||||
|
|
@ -11664,7 +11664,7 @@
|
|||
},
|
||||
"/payment/success": {
|
||||
"get": {
|
||||
"description": "Displays the Yimaru Academy success page after Chapa redirects the learner to return_url",
|
||||
"description": "Displays the Rezina success page after Chapa redirects the learner to return_url",
|
||||
"produces": [
|
||||
"text/html"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -2530,12 +2530,12 @@ info:
|
|||
email: support@swagger.io
|
||||
name: API Support
|
||||
url: http://www.swagger.io/support
|
||||
description: This is server for Yimaru.
|
||||
description: This is server for Rezina.
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
termsOfService: http://swagger.io/terms/
|
||||
title: Yimaru API
|
||||
title: Rezina API
|
||||
version: 1.0.1
|
||||
paths:
|
||||
/api/v1/{tenant_slug}/admin-login:
|
||||
|
|
@ -6137,7 +6137,7 @@ paths:
|
|||
- payments
|
||||
/api/v1/payments/arifpay/success:
|
||||
get:
|
||||
description: Displays the Yimaru Academy success page after ArifPay redirects
|
||||
description: Displays the Rezina success page after ArifPay redirects
|
||||
the learner back to the backend.
|
||||
parameters:
|
||||
- description: ArifPay session identifier
|
||||
|
|
@ -6190,7 +6190,7 @@ paths:
|
|||
- payments
|
||||
/api/v1/payments/chapa/success:
|
||||
get:
|
||||
description: Displays the Yimaru Academy success page after Chapa redirects
|
||||
description: Displays the Rezina success page after Chapa redirects
|
||||
the learner to return_url
|
||||
parameters:
|
||||
- description: Chapa transaction reference (tx_ref)
|
||||
|
|
@ -10202,7 +10202,7 @@ paths:
|
|||
- Vimeo
|
||||
/payment/success:
|
||||
get:
|
||||
description: Displays the Yimaru Academy success page after Chapa redirects
|
||||
description: Displays the Rezina success page after Chapa redirects
|
||||
the learner to return_url
|
||||
parameters:
|
||||
- description: Chapa transaction reference (tx_ref)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Team Member Invitation — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to implement the **team member email invitation** flow in the Yimaru admin panel: sending invites, managing pending invitations, building the public **accept-invitation** page, and signing in after activation.
|
||||
This guide documents how to implement the **team member email invitation** flow in the Rezina admin panel: sending invites, managing pending invitations, building the public **accept-invitation** page, and signing in after activation.
|
||||
|
||||
**Use this guide when:** admins invite staff by email, invitees complete profile setup via a link, and the admin panel lists/resends/revokes invitations.
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ Team invitations let admins onboard staff **without creating a password in the a
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Admin as Admin panel
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
participant Mail as Email (Resend)
|
||||
participant Invitee as Invitee browser
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ The backend builds links from `TEAM_INVITE_BASE_URL`:
|
|||
Example admin panel accept route:
|
||||
|
||||
```
|
||||
https://admin.yimaruacademy.com/accept-invite?token=abc123...
|
||||
https://admin.rezinaacademy.com/accept-invite?token=abc123...
|
||||
```
|
||||
|
||||
The **frontend route** is your choice; only the `token` query param is required for the API.
|
||||
|
|
@ -539,7 +539,7 @@ Content-Type: application/json
|
|||
## Invitation email
|
||||
|
||||
- **Template slug:** `invitation` (system — do not delete)
|
||||
- **Subject:** branded default (“You’re invited to Yimaru Academy”)
|
||||
- **Subject:** branded default (“You’re invited to Rezina”)
|
||||
- **CTA:** `{{.InviteLink}}` → `TEAM_INVITE_BASE_URL?token=...`
|
||||
- **Variables:** `FirstName` (empty for new invites), `InviterName`, `InviteLink`
|
||||
|
||||
|
|
@ -650,7 +650,7 @@ Full session handling: [team-member-refresh-token-admin-panel-integration.md](./
|
|||
## TypeScript types & API client
|
||||
|
||||
```typescript
|
||||
const API_BASE = import.meta.env.VITE_API_BASE_URL; // e.g. https://api.yimaru.com/api/v1
|
||||
const API_BASE = import.meta.env.VITE_API_BASE_URL; // e.g. https://api.rezina.com/api/v1
|
||||
|
||||
export interface ApiResponse<T> {
|
||||
message: string;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Team Member Refresh Token — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to integrate **team member login** and **refresh token rotation** into the Yimaru admin panel. It covers the login/refresh APIs, token lifecycle, storage, HTTP client interceptors, TypeScript types, error handling, and security notes.
|
||||
This guide documents how to integrate **team member login** and **refresh token rotation** into the Rezina admin panel. It covers the login/refresh APIs, token lifecycle, storage, HTTP client interceptors, TypeScript types, error handling, and security notes.
|
||||
|
||||
**Use this guide when:** staff sign in with `POST /api/v1/team/login` and the admin panel must keep sessions alive without forcing re-login when the short-lived access JWT expires.
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ If the admin panel stores a team `refresh_token`, all refresh calls must go to *
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant UI as Admin panel
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
participant DB as PostgreSQL
|
||||
|
||||
UI->>API: POST /team/login (email, password)
|
||||
|
|
@ -119,8 +119,8 @@ JWT claims (`internal/web_server/jwt/jwt.go`):
|
|||
{
|
||||
"UserId": 42,
|
||||
"Role": "ADMIN",
|
||||
"iss": "yimaru.com",
|
||||
"aud": ["api.yimaru.com"],
|
||||
"iss": "rezina.com",
|
||||
"aud": ["api.rezina.com"],
|
||||
"exp": 1719244800
|
||||
}
|
||||
```
|
||||
|
|
@ -171,7 +171,7 @@ Protected routes that receive an expired access token return Fiber errors (often
|
|||
|
||||
## API reference
|
||||
|
||||
Base URL: `{API_BASE}/api/v1` (e.g. `https://api.yimaru.com/api/v1`).
|
||||
Base URL: `{API_BASE}/api/v1` (e.g. `https://api.rezina.com/api/v1`).
|
||||
|
||||
### `POST /team/login`
|
||||
|
||||
|
|
@ -184,7 +184,7 @@ POST /api/v1/team/login
|
|||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"email": "staff@yimaru.com",
|
||||
"email": "staff@rezina.com",
|
||||
"password": "your-password"
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Team Password Reset — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to implement **forgot password / password reset** for **team members** (admin panel staff) in the Yimaru admin panel.
|
||||
This guide documents how to implement **forgot password / password reset** for **team members** (admin panel staff) in the Rezina admin panel.
|
||||
|
||||
**Use this guide when:** a staff member cannot sign in and needs to reset their password via email link, or you are wiring the public “Forgot password” and “Reset password” screens on the admin app.
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ Pending invitees must use the **accept-invite** flow, not password reset.
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Staff as Admin panel (logged out)
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
participant Mail as Email (Resend)
|
||||
participant DB as Postgres
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ The backend builds links from `TEAM_PASSWORD_RESET_BASE_URL` (preferred), or der
|
|||
Example:
|
||||
|
||||
```
|
||||
https://admin.yimaruacademy.com/reset-password?email=admin%40yimaruacademy.com&otp=482913
|
||||
https://admin.rezinaacademy.com/reset-password?email=admin%40rezinaacademy.com&otp=482913
|
||||
```
|
||||
|
||||
| Query param | Required | Notes |
|
||||
|
|
@ -135,9 +135,9 @@ The **frontend route path** is your choice, but it **must match** what the serve
|
|||
**Examples:**
|
||||
|
||||
```env
|
||||
TEAM_PASSWORD_RESET_BASE_URL=https://admin.yimaruacademy.com/reset-password
|
||||
TEAM_PASSWORD_RESET_BASE_URL=https://admin.rezinaacademy.com/reset-password
|
||||
# Optional fallback source if the above is omitted:
|
||||
TEAM_INVITE_BASE_URL=https://admin.yimaruacademy.com/accept-invite
|
||||
TEAM_INVITE_BASE_URL=https://admin.rezinaacademy.com/accept-invite
|
||||
```
|
||||
|
||||
If neither yields a usable base URL, `POST /team/sendResetCode` returns **500** with:
|
||||
|
|
@ -163,7 +163,7 @@ Uses system slug **`password_reset`** (same branded template as historical learn
|
|||
| `ResetLink` | Full URL with `email` + `otp` query params |
|
||||
| `ExpiresMinutes` | Always **5** for team reset |
|
||||
|
||||
Subject (default): `Reset your Yimaru Academy password`
|
||||
Subject (default): `Reset your Rezina password`
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -249,7 +249,7 @@ Content-Type: application/json
|
|||
|
||||
```json
|
||||
{
|
||||
"email": "admin@yimaruacademy.com"
|
||||
"email": "admin@rezinaacademy.com"
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -294,7 +294,7 @@ Content-Type: application/json
|
|||
|
||||
```json
|
||||
{
|
||||
"email": "admin@yimaruacademy.com",
|
||||
"email": "admin@rezinaacademy.com",
|
||||
"otp": "482913",
|
||||
"password": "NewSecurePass1"
|
||||
}
|
||||
|
|
@ -337,7 +337,7 @@ Content-Type: application/json
|
|||
|
||||
```json
|
||||
{
|
||||
"email": "admin@yimaruacademy.com",
|
||||
"email": "admin@rezinaacademy.com",
|
||||
"password": "NewSecurePass1"
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Vimeo Video Upload Progress — Admin Panel Integration Guide
|
||||
|
||||
This guide documents how to implement **real-time video upload progress** in the Yimaru admin panel when uploading videos to Vimeo.
|
||||
This guide documents how to implement **real-time video upload progress** in the Rezina admin panel when uploading videos to Vimeo.
|
||||
|
||||
**Use this guide when:** admins pick a local video file (MP4, MOV, WebM, etc.) and need a live progress bar, cancel support, and post-upload transcode feedback before saving lesson or practice content.
|
||||
|
||||
|
|
@ -40,16 +40,16 @@ This guide documents how to implement **real-time video upload progress** in the
|
|||
|
||||
## Feature overview
|
||||
|
||||
Video lessons in Yimaru are hosted on **Vimeo**. The admin panel uploads videos using **TUS 1.0.0** (resumable upload) directly from the browser to Vimeo's upload endpoint.
|
||||
Video lessons in Rezina are hosted on **Vimeo**. The admin panel uploads videos using **TUS 1.0.0** (resumable upload) directly from the browser to Vimeo's upload endpoint.
|
||||
|
||||
| What | Where it happens |
|
||||
|------|------------------|
|
||||
| Create upload slot | Yimaru API (`POST /vimeo/uploads/tus`) |
|
||||
| Create upload slot | Rezina API (`POST /vimeo/uploads/tus`) |
|
||||
| **Byte-level upload progress** | Browser → Vimeo (`tus-js-client` `onProgress`) |
|
||||
| Transcode / processing status | Yimaru API polls Vimeo (`GET /vimeo/videos/:id/status`) |
|
||||
| Transcode / processing status | Rezina API polls Vimeo (`GET /vimeo/videos/:id/status`) |
|
||||
| Store in lesson/practice | Admin form saves `video_url` / `intro_video_url` |
|
||||
|
||||
The Yimaru API **never receives the video file bytes** during admin uploads. Real-time progress is therefore implemented **in the admin panel client**, not via WebSockets or server push from the backend.
|
||||
The Rezina API **never receives the video file bytes** during admin uploads. Real-time progress is therefore implemented **in the admin panel client**, not via WebSockets or server push from the backend.
|
||||
|
||||
### User-visible phases
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ The Yimaru API **never receives the video file bytes** during admin uploads. Rea
|
|||
|
||||
```text
|
||||
┌─────────────────┐ POST /vimeo/uploads/tus ┌──────────────┐
|
||||
│ Admin panel │ ─────────────────────────────────► │ Yimaru API │
|
||||
│ Admin panel │ ─────────────────────────────────► │ Rezina API │
|
||||
│ (browser) │ ◄──── upload_link + vimeo_id ───── │ │
|
||||
└────────┬────────┘ └──────────────┘
|
||||
│
|
||||
|
|
@ -81,7 +81,7 @@ The Yimaru API **never receives the video file bytes** during admin uploads. Rea
|
|||
│ after onSuccess
|
||||
▼
|
||||
┌─────────────────┐ GET /vimeo/videos/:id/status ┌──────────────┐
|
||||
│ Admin panel │ ─────────────────────────────────► │ Yimaru API │
|
||||
│ Admin panel │ ─────────────────────────────────► │ Rezina API │
|
||||
│ (poll loop) │ ◄──── { status: in_progress } ──── │ → Vimeo API │
|
||||
└─────────────────┘ └──────────────┘
|
||||
```
|
||||
|
|
@ -95,7 +95,7 @@ The Yimaru API **never receives the video file bytes** during admin uploads. Rea
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant UI as Admin panel UI
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
participant Vimeo as Vimeo TUS + transcode
|
||||
|
||||
UI->>UI: User selects video file
|
||||
|
|
@ -323,11 +323,11 @@ Content-Type: application/json
|
|||
|
||||
---
|
||||
|
||||
### Step 2 — Upload file (browser → Vimeo, not Yimaru API)
|
||||
### Step 2 — Upload file (browser → Vimeo, not Rezina API)
|
||||
|
||||
Performed by `tus-js-client` against `upload_link`. See [TUS upload with progress](#tus-upload-with-progress).
|
||||
|
||||
No `Authorization` header to Yimaru API during this step. Vimeo authenticates via the upload URL.
|
||||
No `Authorization` header to Rezina API during this step. Vimeo authenticates via the upload URL.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -410,7 +410,7 @@ const tus = await import("tus-js-client");
|
|||
### Environment (admin panel)
|
||||
|
||||
```env
|
||||
VITE_API_BASE_URL=https://api.yimaru.com
|
||||
VITE_API_BASE_URL=https://api.rezina.com
|
||||
```
|
||||
|
||||
### Network / CORS
|
||||
|
|
@ -1238,7 +1238,7 @@ Chrome DevTools → Network → Throttling. Verify progress bar moves smoothly d
|
|||
| Step | Method | Path | Auth / permission |
|
||||
|------|--------|------|-------------------|
|
||||
| 1. Create slot | `POST` | `/api/v1/vimeo/uploads/tus` | Bearer + `vimeo.uploads.tus` |
|
||||
| 2. Upload bytes | TUS `PATCH` | `{upload_link}` from step 1 | Vimeo upload URL (no Yimaru token) |
|
||||
| 2. Upload bytes | TUS `PATCH` | `{upload_link}` from step 1 | Vimeo upload URL (no Rezina token) |
|
||||
| 3. Poll transcode | `GET` | `/api/v1/vimeo/videos/:video_id/status` | Bearer + `vimeo.videos.status` |
|
||||
| Preview embed | `GET` | `/api/v1/vimeo/videos/:video_id/embed` | Bearer + `vimeo.videos.embed` |
|
||||
| Delete orphan | `DELETE` | `/api/v1/vimeo/videos/:video_id` | Bearer + `vimeo.videos.delete` |
|
||||
|
|
@ -1261,4 +1261,4 @@ canonical page link = https://vimeo.com/{vimeo_id}
|
|||
|
||||
---
|
||||
|
||||
*Last updated for Yimaru API `production` branch — Vimeo TUS handlers in `internal/web_server/handlers/vimeo.go`.*
|
||||
*Last updated for Rezina API `production` branch — Vimeo TUS handlers in `internal/web_server/handlers/vimeo.go`.*
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ When the iOS app shows **Subscription required** (locked content), it should **n
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant iOS as iOS app
|
||||
participant API as Yimaru API
|
||||
participant API as Rezina API
|
||||
participant User as Email / SMS
|
||||
participant Web as Web checkout app
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ One link per **15 minutes** per user (`429` if called too soon).
|
|||
|
||||
| Variable | Example |
|
||||
|----------|---------|
|
||||
| `LEARNER_WEB_CHECKOUT_BASE_URL` | `https://subscribe.yimaruacademy.com` |
|
||||
| `LEARNER_WEB_CHECKOUT_BASE_URL` | `https://subscribe.rezinaacademy.com` |
|
||||
|
||||
Links are built as:
|
||||
|
||||
|
|
@ -177,12 +177,12 @@ flowchart TD
|
|||
|
||||
| Variable | Example | Purpose |
|
||||
|----------|---------|---------|
|
||||
| `VITE_API_BASE_URL` | `https://api.yimaruacademy.com/api/v1` | Yimaru API |
|
||||
| `LEARNER_WEB_CHECKOUT_BASE_URL` (backend) | `https://subscribe.yimaruacademy.com` | Base URL embedded in email/SMS links |
|
||||
| `VITE_API_BASE_URL` | `https://api.rezinaacademy.com/api/v1` | Rezina API |
|
||||
| `LEARNER_WEB_CHECKOUT_BASE_URL` (backend) | `https://subscribe.rezinaacademy.com` | Base URL embedded in email/SMS links |
|
||||
| `VITE_APP_STORE_URL` | `https://apps.apple.com/...` | Optional iOS download link on success |
|
||||
| `VITE_PLAY_STORE_URL` | `https://play.google.com/...` | Optional Android link |
|
||||
|
||||
Production API base: `https://api.yimaruacademy.com/api/v1`
|
||||
Production API base: `https://api.rezinaacademy.com/api/v1`
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -276,7 +276,7 @@ POST /api/v1/auth/customer-login
|
|||
|
||||
#### Google / Apple sign-in
|
||||
|
||||
Same as the mobile app — exchange the provider identity token for Yimaru JWTs.
|
||||
Same as the mobile app — exchange the provider identity token for Rezina JWTs.
|
||||
|
||||
**Google (web ID token):**
|
||||
|
||||
|
|
@ -311,7 +311,7 @@ POST /api/v1/auth/apple
|
|||
|----------|---------------------|
|
||||
| `VITE_GOOGLE_CLIENT_ID` | `GOOGLE_OAUTH_WEB_CLIENT_ID` (or comma-separated in `GOOGLE_OAUTH_CLIENT_ID`) |
|
||||
| `VITE_APPLE_CLIENT_ID` | include Services ID in `APPLE_SIGN_IN_CLIENT_IDS` |
|
||||
| `VITE_APPLE_REDIRECT_URI` | must match Apple Developer redirect URL (e.g. `https://subscribe.yimaruacademy.com/subscribe/login`) |
|
||||
| `VITE_APPLE_REDIRECT_URI` | must match Apple Developer redirect URL (e.g. `https://subscribe.rezinaacademy.com/subscribe/login`) |
|
||||
|
||||
Buttons are hidden when the corresponding `VITE_*` values are unset.
|
||||
|
||||
|
|
@ -428,7 +428,7 @@ Authorization: Bearer <token>
|
|||
```json
|
||||
{
|
||||
"payment_id": 100,
|
||||
"session_id": "yimaru-tx-abc123",
|
||||
"session_id": "rezina-tx-abc123",
|
||||
"payment_url": "https://checkout.chapa.co/...",
|
||||
"amount": 499.0,
|
||||
"currency": "ETB",
|
||||
|
|
@ -483,11 +483,11 @@ Expect an `ACTIVE` subscription with matching `category`.
|
|||
**Success UI copy (suggested):**
|
||||
|
||||
> Your subscription is active.
|
||||
> Open **Yimaru Academy** on your iPhone and sign in with this account.
|
||||
> Open **Rezina** on your iPhone and sign in with this account.
|
||||
|
||||
Optional buttons:
|
||||
|
||||
- **Open app** — custom URL scheme / Universal Link (`yimaru://` or `https://app.yimaru.com/open`) if configured
|
||||
- **Open app** — custom URL scheme / Universal Link (`rezina://` or `https://app.rezina.com/open`) if configured
|
||||
- **Download on App Store** — marketing link only; not a payment link
|
||||
|
||||
---
|
||||
|
|
@ -630,4 +630,4 @@ curl -s "$API/api/v1/subscriptions/me" \
|
|||
|
||||
---
|
||||
|
||||
*Aligns with Yimaru API `production` branch — Chapa hosted checkout via `SubscribeWithPayment` / `InitiateSubscriptionPayment`.*
|
||||
*Aligns with Rezina API `production` branch — Chapa hosted checkout via `SubscribeWithPayment` / `InitiateSubscriptionPayment`.*
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
customlogger "Yimaru-Backend/internal/logger"
|
||||
"Rezina-Backend/internal/domain"
|
||||
customlogger "Rezina-Backend/internal/logger"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
|
|
@ -396,7 +396,7 @@ func (c *Config) loadEnv() error {
|
|||
|
||||
c.AFRO_SMS_SENDER_NAME = os.Getenv("AFRO_SMS_SENDER_NAME")
|
||||
if c.AFRO_SMS_SENDER_NAME == "" {
|
||||
c.AFRO_SMS_SENDER_NAME = "Yimaru Acad"
|
||||
c.AFRO_SMS_SENDER_NAME = "Rezina"
|
||||
}
|
||||
|
||||
c.AFRO_SMS_RECEIVER_PHONE_NUMBER = os.Getenv("AFRO_SMS_RECEIVER_PHONE_NUMBER")
|
||||
|
|
@ -564,7 +564,7 @@ func (c *Config) loadEnv() error {
|
|||
}
|
||||
|
||||
if strings.TrimSpace(c.MinIO.Bucket) == "" {
|
||||
c.MinIO.Bucket = "yimaru"
|
||||
c.MinIO.Bucket = "rezina"
|
||||
}
|
||||
minioUseSSL := os.Getenv("MINIO_USE_SSL")
|
||||
if minioUseSSL == "true" || minioUseSSL == "1" {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package domain
|
||||
|
||||
import (
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package domain
|
|||
|
||||
import "time"
|
||||
|
||||
// AppTimezoneName is the default business timezone for Yimaru (East Africa Time).
|
||||
// AppTimezoneName is the default business timezone for Rezina (East Africa Time).
|
||||
const AppTimezoneName = "Africa/Addis_Ababa"
|
||||
|
||||
// AppTimezone returns Africa/Addis_Ababa (EAT, UTC+3). Used as the default for
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
package infrastructure
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"encoding/csv"
|
||||
"os"
|
||||
"strconv"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mongoLogger
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/config"
|
||||
"Rezina-Backend/internal/config"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mongoLogger
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/config"
|
||||
"Rezina-Backend/internal/config"
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package ports
|
|||
import (
|
||||
"context"
|
||||
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
)
|
||||
|
||||
// LmsPersonaReader resolves catalog personas referenced by LMS / exam-prep practices.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package ports
|
|||
import (
|
||||
"context"
|
||||
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
)
|
||||
|
||||
type NotificationStore interface {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ports
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
"time"
|
||||
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
)
|
||||
|
||||
type TeamStore interface {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
"time"
|
||||
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
)
|
||||
|
||||
type ProfileCompletionStatus struct {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package repository
|
||||
|
||||
import (
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
"Yimaru-Backend/internal/domain"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"strings"
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import (
|
|||
"errors"
|
||||
"time"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Yimaru-Backend/internal/ports"
|
||||
"Yimaru-Backend/internal/services/authentication"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/ports"
|
||||
"Rezina-Backend/internal/services/authentication"
|
||||
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package repository
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Yimaru-Backend/internal/ports"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/ports"
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package repository
|
|||
import (
|
||||
"context"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
"Yimaru-Backend/internal/domain"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"Rezina-Backend/internal/domain"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package repository
|
|||
import (
|
||||
"context"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
)
|
||||
|
||||
func (s *Store) ListUserExamPrepFlatLearningActivity(ctx context.Context, userID int64) ([]dbgen.ListUserExamPrepFlatLearningActivityByUserRow, error) {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
"Yimaru-Backend/internal/domain"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"Rezina-Backend/internal/domain"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
"Yimaru-Backend/internal/domain"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"Rezina-Backend/internal/domain"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package repository
|
|||
import (
|
||||
"context"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
)
|
||||
|
||||
// ExamPrepCountPublishedPracticesInLesson returns published practices attached to an exam-prep lesson.
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
"Yimaru-Backend/internal/domain"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"Rezina-Backend/internal/domain"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
"Yimaru-Backend/internal/domain"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"Rezina-Backend/internal/domain"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
"Yimaru-Backend/internal/domain"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"Rezina-Backend/internal/domain"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package repository
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Yimaru-Backend/internal/ports"
|
||||
"Rezina-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/ports"
|
||||
"context"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package repository
|
||||
|
||||
import (
|
||||
"Yimaru-Backend/internal/ports"
|
||||
"Rezina-Backend/internal/ports"
|
||||
)
|
||||
|
||||
// NewInitialAssessmentStore returns the Store which now delegates to the unified questions system
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"Yimaru-Backend/internal/domain"
|
||||
"Rezina-Backend/internal/domain"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package repository
|
||||
|
||||
import (
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package repository
|
|||
import (
|
||||
"context"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
)
|
||||
|
||||
func (s *Store) LmsGetPreviousProgram(ctx context.Context, programID int64) (dbgen.Program, error) {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
"Yimaru-Backend/internal/domain"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"Rezina-Backend/internal/domain"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
"Yimaru-Backend/internal/domain"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"Rezina-Backend/internal/domain"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
|
||||
dbgen "Yimaru-Backend/gen/db"
|
||||
"Yimaru-Backend/internal/domain"
|
||||
dbgen "Rezina-Backend/gen/db"
|
||||
"Rezina-Backend/internal/domain"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user