T Tachy School ERP Docs v2025.08

Tachy School ERP — Documentation

Run your institute on one platform: Online Fees (Cashfree, Razorpay, Stripe, Paytm), QR Attendance, Exams, Timetable, Transport, Hostel, Library, Inventory, Payroll, and multi-channel Notifications.

Quick links

Quick Start

Requirements

  • PHP 8.1+ with PDO, cURL, mbstring
  • MySQL/MariaDB 10.4+ (InnoDB)
  • Composer (for vendor libs) & OpenSSL
  • Web server (Apache/Nginx). XAMPP on Windows OK

First Login

  • Login as schooladmin
  • Open School → Settings
  • Set timezone, currency, and upload logo
  • Go to Payment Gateway tab → enable Cashfree (or another)
Windows (XAMPP) install steps
  1. Install XAMPP, start Apache + MySQL
  2. Place project under C:\xampp\htdocs\ (e.g., C:\xampp\htdocs\school)
  3. Create DB, import schema, set env config (database creds)
  4. Visit http://localhost/school/
Ubuntu / Linux install steps
  1. Install PHP 8.1+, MySQL, and Apache/Nginx
  2. Copy project to /var/www/school; set permissions for /public/uploads
  3. Create DB, import schema, set env config
  4. Configure vhost root to /public, restart web server

Core Concepts & Roles

Multi-school

Separate schools and school_settings per campus.

RBAC

Role-based permissions for schooladmin, accountant, frontdesk, librarian, etc.

Audit & History

Key actions are logged (audit_logs) and login_history stored.

Feature Matrix (Modules)

  • Students & Guardians
  • Fees & Payments (online/offline)
  • Attendance (QR devices & scans)
  • Exams, routines, results
  • Timetable & class mapping
  • Library & circulation
  • Transport (routes/vehicles)
  • Hostel (blocks/rooms)
  • Inventory/Store (POS)
  • Staff & Payroll

Online Payments

Multi-gateway architecture with per-school configuration.

How it works

  1. User opens Invoice → clicks Pay Now.
  2. Browser calls /public/api/v1/payments/create.php → creates order in gateway; returns session/token.
  3. Gateway checkout → redirects to /public/payments/return.php?order_id=....
  4. Return page verifies via API, then credits invoice (creates fee_payments row, updates fee_invoices.status).
  5. Webhook /public/api/v1/payments/cashfree_webhook.php also records events for resilience.
Tables involved
  • school_payment_providers — per-school gateway & credentials
  • payments — internal payment intents/logs
  • fee_invoices / fee_payments — fees & settlements
  • webhooks_incoming — raw webhook payloads (optional)

Enable a gateway (per school)

  1. Go to School → Settings → Payment Gateway.
  2. Select provider (e.g., Cashfree), choose Sandbox or Production.
  3. Paste keys/credentials (e.g., client_id, client_secret; webhook secret if applicable).
  4. Save & test with a small invoice.

Endpoints

POST /public/api/v1/payments/create.php
RETURNS: { ok, provider, payment_session_id, merchant_order_id, mode }
GET  /public/payments/return.php?order_id=<MERCHANT_ORDER_ID>
ACTION: Verifies with provider, credits invoice, updates status.
POST /public/api/v1/payments/cashfree_webhook.php
ACTION: Records webhook and reconciles payment asynchronously.

Status mapping

Provider Gateway Status Internal Invoice
CashfreeSUCCESSPAIDpaid
AnyPENDINGPENDINGpending
AnyFAILEDFAILEDpending

Adding other gateways

We include adapters for Razorpay/Stripe/Paytm. Just enable in Settings → Payment Gateway, add keys, and the same “Pay Now” flow will switch to the selected provider automatically.

Fees & Invoices

  • Generate fees from catalogue (fees, fee_categories) with concessions and taxes.
  • Invoices stored in fee_invoices; payments in fee_payments.
  • Print/download invoice at /school/fees/invoice_print.php (shows Pay Now if due > 0).
  • After successful payment, invoice status becomes paid (or partially_paid).
<!-- Inside invoice_print.php -->
<button class="btn btn-primary" onclick="startInvoicePayment()">Pay Now</button>

QR Attendance

  1. Register devices in qr_devices.
  2. Scan/submit to record in qr_scans; daily status stored in attendance.
  3. Grace minutes can be set in Settings → General.

Exams & Academics

Manage exams, subjects and results:

  • exams, exam_subjects, exam_routines, exam_results
  • Minimum pass % configured in Settings → General.

Transport • Hostel • Library • Inventory

Transport

  • transport_routes, vehicles, student assignments

Hostel

  • hostels, hostel_rooms, hostel_allocations

Library

  • Books (books) & circulation (book_issues)

Inventory / Store (POS)

  • inventory_items, inventory_movements, inventory_sales, inventory_sale_items
  • Optionally link store receipts to invoices

Notifications

Configure providers in Settings:

  • Email: SMTP/SendGrid/Mailgun/SES
  • SMS: Twilio/MSG91/Textlocal
  • WhatsApp: Meta Cloud / Twilio

Use templates (notification_templates). One-click test sends available.

Install & Deployment

Environment

  • Set DB credentials in your app config (bootstrap/env)
  • Ensure /public/uploads writable
  • Composer install (if applicable)

Production tips

  • Force HTTPS, set HSTS on domain
  • Rotate gateway/webhook secrets regularly
  • Enable DB backups & off-site copies

Security & Compliance

  • CSRF tokens on form posts; prepared statements (PDO) for DB.
  • Least-privilege RBAC; audit logs for critical actions.
  • PII encrypted at rest where needed; follow local compliance (e.g., Indian IT Rules, GDPR if applicable).

Backup & Maintenance

  • Nightly DB dump; weekly off-site copy
  • File backup for /public/uploads (logos, documents)
  • Verify restore quarterly (drills)

Troubleshooting

Invoice shows pending after success

  • Check return.php polling; ensure API keys correct.
  • Ensure fee_payments.fee_id maps to a valid fees.id.

“Could not locate bootstrap.php”

  • Verify project root and /public path mapping.

Webhook 400 / Empty body

  • Use correct URL (/public/api/v1/payments/cashfree_webhook.php).
  • Accept raw POST body; verify secret if used.

SQL foreign key errors

  • Insert fee_id/student_id when crediting payments.
  • Use existing invoice’s fee_id/student_id.

FAQ

Can I enable multiple gateways?

Yes. Configure multiple providers per school; mark one as enabled at a time.

Do you support partial payments?

Yes. If the paid sum is less than the invoice total, status becomes partially_paid.

Does QR Attendance work offline?

Devices need network to sync; cached scans can be queued on the device app if implemented.

Changelog

  • 2025-08-22 — Payments engine live (Cashfree), multi-gateway adapters (Razorpay/Stripe/Paytm), improved invoice UI, return & webhook flows.
  • 2025-08-15 — QR Attendance enhancements, templates for Email/SMS/WhatsApp.