## 1. Overview

Academy LMS is a Django-based online course platform with enrollments, payments (manual + Stripe), skill certifications with verifiable certificates, support tickets, theming, and role-based dashboards.

Version 1.0.0

## 2. System requirements

- Python 3.10+ (3.12 recommended)
- pip + virtual environment
- SQLite or MySQL 5.7+ / MariaDB / MySQL 8
- Write access to `media/`, `logs/`, `storage/`

    pip install -r requirements.txt

## 3. Installation (summary)

1. Upload / extract the Main Files package to your server.
2. Create and activate a virtualenv.
3. Install dependencies: `pip install -r requirements.txt`
4. Start the app (runserver, Passenger, Gunicorn + Nginx, etc.).
5. Open `https://your-domain.com/install/` and finish the wizard.
6. Login → Academy Settings → set logo, theme, payments.

Do not ship your personal `.env`, `venv/`, or `db.sqlite3` in the buyer ZIP.

## 4. Web installer steps

1. Welcome — introduction
2. Requirements — automatic checks
3. Database — SQLite or MySQL
4. Site & Admin — academy name + admin login
5. Install — migrations, admin user, lock file

Lock file path: `storage/installed`. While this file exists, `/install/` is blocked (except the complete page).

To reinstall (advanced): delete `storage/installed`, drop/recreate DB if needed, then visit `/install/` again.

## 5. cPanel (Setup Python App)

1. Create a MySQL database + user (All Privileges).
2. Create a Python App (3.10+). Application root = project folder (where `manage.py` lives).
3. Application startup file: `passenger_wsgi.py` · Entry point: `application`
4. Enter the virtualenv shown in cPanel → `pip install -r requirements.txt`
5. `python manage.py collectstatic --noinput` then Restart the app.
6. Visit `/install/` on your domain and finish the wizard (choose MySQL).

Open `START-HERE.html` in the deploy ZIP for screenshots-style steps. Ensure `media/`, `logs/`, `storage/` are writable.

Static files are served by WhiteNoise after collectstatic. Media is served by Django when `SERVE_MEDIA=True` (default).

## 5b. Admin Guide (after install)

Full step-by-step for every module (including Free skill check enable/disable):

- In the dashboard sidebar: Admin Guide
- Or open admin-guide.html from this Documentation folder

## 6. Local MAMP (macOS)

1. Start MAMP (MySQL on port `8889` typically).
2. Create empty database e.g. `academy_lms`.
3. Run the project with `python manage.py runserver`.
4. In installer choose MySQL: host `127.0.0.1`, port `8889`, user/password usually `root`/`root`.

## 7. User roles

Role | Can do
--- | ---
Admin | Everything: settings, theme, users, courses, admissions, tickets (incl. delete)
Support Staff | Admissions approve/reject, approve certification fee payments, reply to tickets (no delete / no settings)
Teacher | Own courses + enrollments for those courses
Student | Browse, enroll, pay, learn, open tickets

## 8. Academy Settings

Admin → Academy Settings:

- Branding (name, logo, favicon)
- Theme & colors (presets or custom)
- Currency
- Manual payment instructions + Stripe keys

## 9. Payments

- Manual — student uploads proof → staff/admin/teacher approves → course unlocks
- Stripe — Checkout Session → auto-activate on success
- Free — price 0 auto-activates

Stripe webhook URL (shown in settings): `/enrollments/webhooks/stripe/`

## 10. Support tickets

All roles can open tickets. Admin & Support Staff see the full inbox. Only Admin can permanently delete a ticket.

## 11. Skill certifications

Separate from courses — for people who already have skills and need a formal certificate.

1. Candidate applies on `/certifications/` and pays the certification fee (set by admin per program).
2. They schedule the test: book a slot at a TSN Digital testing center, or choose remote online.
3. At the center (or in a live remote meeting), staff generates an unlock code (`EXAM-XXXX`).
4. Candidate enters the code, then takes a timed exam of 100 random MCQs (default 120 minutes, ~72 seconds each; minimum 100 minutes) drawn from a bank of at least 800 questions.
5. Pass mark: default 70% (admin-configurable). Below that = fail.
6. On fail: pay the reattempt fee, re-schedule, get a new unlock code — up to 2 reattempts (3 attempts total by default).
7. On pass: certificate issued with unique code; verify at `/certifications/verify/`.

Admin manages centers under Testing Centers, slots under Exam Schedules, and programs under Certifications.

Seed a demo 100-MCQ program: `python manage.py seed_certifications`

Stripe webhook for cert fees: `/certifications/webhooks/stripe/`

## 12. Third-party credits

- Django — https://www.djangoproject.com/
- Bootstrap 5 — https://getbootstrap.com/
- Bootstrap Icons — https://icons.getbootstrap.com/
- Stripe Python SDK — https://stripe.com/
- Pillow, python-dotenv, PyMySQL

## 13. Item support (Envato)

Support includes help with installation issues caused by the item, bug fixes, and answering questions about features described in this documentation.

Support does not include custom development, server configuration beyond documented steps, or third-party plugin conflicts unless caused by this item.