Skip to content

dimasprass/sysacad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

SIAKAD – School Academic System

A full-stack school academic system with Laravel 12 (backend), React (frontend), and MySQL.

Features

  • Login – Email/password authentication (admin, teacher, student roles)
  • Lessons – Add and manage subjects (code, name, teacher)
  • Teachers – Add and manage teachers (NIP, name, email, password)
  • Students – Add and manage students (NIS, name, class, email, password)
  • Online assignments – Create assignments per lesson; students submit; teachers grade

Tech stack

Layer Stack
Backend Laravel 12, PHP 8.2+, Laravel Sanctum
Frontend React 19, Vite, React Router, Axios
Database MySQL 8+

Project structure

sysacad/
├── backend/     # Laravel 12 API (custom code; see backend/README.md for full setup)
├── frontend/    # React SPA (Vite)
└── README.md    # This file

Quick start

1. Backend (Laravel 12 + MySQL)

Requirements: PHP 8.2+, Composer, MySQL.

  1. Create a new Laravel 12 project and install Sanctum:

    composer create-project laravel/laravel backend-temp
    cd backend-temp
    composer require laravel/sanctum
  2. Copy the contents of this repo’s backend folder into backend-temp (overwrite when asked). If you prefer, remove the original backend folder and rename backend-temp to backend.

  3. In bootstrap/app.php, ensure API routes are registered (they are if you used the backend files as above):

    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        api: __DIR__.'/../routes/api.php',
        commands: __DIR__.'/../routes/console.php',
        health: '/up',
        apiPrefix: 'api',
    )
  4. Environment and database:

    cp .env.example .env
    php artisan key:generate

    Edit .env: set DB_DATABASE, DB_USERNAME, DB_PASSWORD for MySQL. Optionally set FRONTEND_URL (e.g. http://localhost:5173).

  5. Migrate and seed:

    php artisan migrate
    php artisan db:seed
  6. Run the API:

    php artisan serve

    API base: http://localhost:8000 (routes under /api).

2. Frontend (React)

Requirements: Node.js 18+.

cd frontend
npm install
npm run dev

Open http://localhost:5173. The dev server proxies /api to http://localhost:8000, so the backend must be running.

3. Demo login

After seeding the backend:

Role Email Password
Admin admin@siakad.test password
Teacher teacher@siakad.test password
Student student@siakad.test password

API overview

  • POST /api/login – Login (email, password) → returns token and user.
  • POST /api/logout – Logout (Bearer token).
  • GET /api/user – Current user (Bearer token).
  • Lessons: GET/POST /api/lessons, GET/PUT/DELETE /api/lessons/{id}.
  • Teachers: GET/POST /api/teachers, GET/PUT/DELETE /api/teachers/{id}.
  • Students: GET/POST /api/students, GET/PUT/DELETE /api/students/{id}.
  • Assignments: GET/POST /api/assignments, GET/PUT/DELETE /api/assignments/{id}.
  • POST /api/assignments/{id}/submit – Student submit (body: content).
  • POST /api/assignments/{id}/submissions/{submissionId}/grade – Teacher grade (body: score).

Protected routes require header: Authorization: Bearer <token>.

License

MIT.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors