TutorLoom
The learning platform for companies, colleges and training institutes. Free and open source, with an Enterprise edition.
翻译准备中
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证NextJS Repo
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Admin interface for managing JNV (Jawahar Navodaya Vidyalaya) student enrollments for Avanti Fellows.
admin (Admin): all features, all Schools and all programsprogram_admin (Program Admin): oversees scoped Schools and their own School visitsprogram_manager (Program Manager): conducts School visits in their assigned Schoolsteacher (Teacher): views and manages Students in their assigned Schoolsholistic_mentorship_admin (Holistic Mentorship Admin): manages Holistic Mentorship onlypmu_manager (PMU Manager): Avanti's internal PMU team; JNV NVS only, in one or more JNV Schools (or all of them), with the JNV NVS Schools dashboardpmu_govt_school_user (PMU Govt School User): an external stakeholder of exactly one JNV NVS School (e.g. its principal); JNV NVS only, and lands straight on that Schoolalumni_manager (Alumni Manager): views and updates alumni of their assigned Schools only; no Students, programs or other featuresnvm lets you install and switch between different Node.js versions.
On macOS/Linux, open Terminal and run:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
After it finishes, close and reopen your terminal, then verify it worked:
nvm --version
You should see a version number like 0.40.1.
Troubleshooting: If nvm: command not found, run this and try again:
source ~/.bashrc
Or if you use zsh (default on newer Macs):
source ~/.zshrc
nvm install 22
Verify it installed correctly:
node --version
You should see v22.x.x (e.g., v22.21.1).
git clone https://github.com/avantifellows/af_lms.git
cd af_lms
The project includes a .nvmrc file that specifies the Node version. Run:
nvm use
You should see: Now using node v22.x.x
npm install
This will download all required packages. Wait for it to complete.
Copy the example file:
cp .env.example .env.local
Open .env.local in a text editor and fill in the values. Ask your team lead for the actual credentials:
# Database (get these from your team lead)
DATABASE_HOST=your-db-host
DATABASE_PORT=1357
DATABASE_USER=postgres
DATABASE_PASSWORD=your-db-password
DATABASE_NAME=your-db-name
# DB Service (get these from your team lead)
DB_SERVICE_URL=https://staging-db.avantifellows.org/api
DB_SERVICE_TOKEN=your-db-service-token
# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=generate-a-random-string
# Google OAuth (get these from your team lead)
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
To generate NEXTAUTH_SECRET, run:
openssl rand -base64 32
Copy the output and paste it as the value.
npm run db:setup-permissions
This creates the permissions table. It's safe to run multiple times.
npm run dev
Open your browser and go to: http://localhost:3000
Close and reopen your terminal, or run source ~/.zshrc (Mac) or source ~/.bashrc (Linux).
Run nvm install 22 then nvm use.
Check that your .env.local has the correct database credentials. Make sure your IP is whitelisted if connecting to a remote database.
Make sure you ran nvm use before npm run dev or npm run build.
Each time you open a new terminal to work on this project:
cd af_lms # Go to the project folder
nvm use # Switch to the correct Node version
npm run dev # Start the development server
| Command | Description |
|---|---|
npm run dev | Start development server |
npm run build | Build for production |
npm run start | Start production server |
npm run lint | Run ESLint |
npm run db:setup-permissions | Create/update permissions table |
This app uses a hybrid approach:
This is intentional technical debt for rapid development. The DB Service is Avanti Fellows' canonical data layer.
Permissions are stored in user_permission table:
email: User's email (unique)level: School scope level (1-3)school_codes: Array of school codes (for level 1)regions: Array of region names (for level 2)read_only: Boolean for view-only accesssrc/
├── app/
│ ├── dashboard/ # School listing + student search
│ ├── school/[udise]/ # Student table for a school
│ ├── admin/ # Admin pages
│ │ └── users/ # User management
│ └── api/
│ ├── admin/ # Admin API routes
│ ├── student/ # Student update API
│ └── students/search # Student search API
├── components/
│ ├── StudentTable.tsx # Student list with grade filter
│ ├── StudentSearch.tsx # Global student search
│ └── EditStudentModal.tsx
├── lib/
│ ├── auth.ts # NextAuth config
│ ├── db.ts # PostgreSQL connection
│ └── permissions.ts # Permission helpers
└── scripts/
└── setup-permissions.ts
/admin/users (requires admin access)Or manually via database:
INSERT INTO user_permission (email, level, school_codes, regions, read_only)
VALUES ('[email protected]', 3, NULL, NULL, false);
The app is deployed on AWS Amplify. Pushes to main trigger automatic deployments via GitHub Actions.
| Environment | URL |
|---|---|
| Production | https://lms.avantifellows.org |
See AMPLIFY_DEPLOYMENT.md for full deployment setup and instructions.
Environment variables are managed via GitHub Secrets and synced to Amplify by GitHub Actions. See .env.example for the full list.
The Google OAuth client must have the authorized redirect URI:
https://lms.avantifellows.org/api/auth/callback/google
Configure this in Google Cloud Console.