Skip to content

SImunna00/transcript-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Laravel Logo

Build Status Total Downloads Latest Stable Version License

πŸŽ“ Transcript Management System

PHP Laravel License GitHub

A comprehensive web-based application for managing student transcripts, marksheets, and academic records with multi-role authentication (Admin, Teacher, Student).

πŸ“‘ Table of Contents

🎯 Overview

This Laravel-based Transcript Management System streamlines academic record management, enabling:

  • Automated mark entry and CGPA calculation
  • PDF marksheet generation
  • Online transcript requests with payment processing
  • Multi-role access control (Student, Teacher, Admin)

Live Demo: [Coming Soon]

✨ Features

πŸ‘¨β€πŸŽ“ Student Portal

  • βœ… Secure registration and authentication
  • βœ… View enrolled courses and marks
  • βœ… Request official transcripts
  • βœ… Integrated payment gateway (SSLCommerz)
  • βœ… Track request status in real-time
  • βœ… Download PDF marksheets

πŸ‘¨β€πŸ« Teacher Portal

  • βœ… Comprehensive mark entry system (Theory/Lab/Special courses)
  • βœ… Student search and enrollment verification
  • βœ… Automated marksheet generation with CGPA
  • βœ… View student academic history
  • βœ… Bulk mark entry support

πŸ‘¨β€πŸ’Ό Admin Portal

  • βœ… User management (Students, Teachers, Admins)
  • βœ… Academic year and term configuration
  • βœ… Course catalog management
  • βœ… Transcript request processing
  • βœ… Payment verification and tracking
  • βœ… System reports and analytics
  • βœ… Document upload and management

πŸ” Security Features

  • Multi-guard authentication system
  • Role-based access control (RBAC)
  • CSRF protection
  • XSS prevention
  • SQL injection protection
  • Secure payment processing

πŸ› οΈ Tech Stack

Category Technology
Backend Laravel 12.x, PHP 8.2+
Database SQLite (dev), MySQL/PostgreSQL (prod)
Frontend Blade Templates, Bootstrap 5
Authentication Laravel Breeze (Multi-Guard)
Payment SSLCommerz (Bangladesh)
PDF Generation DomPDF / Laravel PDF
Version Control Git, GitHub
Server Apache/Nginx

πŸš€ Installation

Prerequisites

Ensure you have the following installed:

Step 1: Clone Repository

git clone https://github.com/SImunna00/transcript-management.git
cd transcript-management

Step 2: Install Dependencies

# Install PHP dependencies
composer install

# Install JavaScript dependencies
npm install

# Build assets
npm run build

Step 3: Environment Configuration

# Copy environment file
cp .env.example .env

# Generate application key
php artisan key:generate

Step 4: Configure .env File

Edit .env with your settings:

APP_NAME="Transcript Management System"
APP_ENV=local
APP_KEY=base64:generated_key_here
APP_DEBUG=true
APP_URL=http://localhost:8000

# Database Configuration (SQLite for development)
DB_CONNECTION=sqlite
# DB_DATABASE=/absolute/path/to/database.sqlite

# For MySQL/PostgreSQL in production
# DB_CONNECTION=mysql
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=transcript_db
# DB_USERNAME=root
# DB_PASSWORD=your_password

# SSLCommerz Payment Configuration (Sandbox)
SSLCOMMERZ_STORE_ID=your_store_id
SSLCOMMERZ_STORE_PASSWORD=your_store_password
SSLCOMMERZ_SANDBOX=true

# For Production
# SSLCOMMERZ_SANDBOX=false

# Mail Configuration (for notifications)
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your_username
MAIL_PASSWORD=your_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply@transcript.edu
MAIL_FROM_NAME="${APP_NAME}"

# Session & Cache
SESSION_DRIVER=file
CACHE_DRIVER=file
QUEUE_CONNECTION=sync

Step 5: Database Setup

# Create SQLite database (if using SQLite)
touch database/database.sqlite

# Run migrations
php artisan migrate

# Seed database with sample data
php artisan db:seed

# Or run specific seeders
php artisan db:seed --class=AcademicYearSeeder
php artisan db:seed --class=TermSeeder
php artisan db:seed --class=TeacherCourseSeeder

Step 6: Storage & Permissions

# Create symbolic link for storage
php artisan storage:link

# Set permissions (Linux/Mac)
chmod -R 775 storage bootstrap/cache

# On Windows (run as Administrator in CMD)
# icacls storage /grant Users:F /T
# icacls bootstrap/cache /grant Users:F /T

Step 7: Start Development Server

# Start Laravel development server
php artisan serve

# In another terminal, watch for asset changes
npm run dev

Visit: http://localhost:8000

βš™οΈ Configuration

Payment Gateway Setup (SSLCommerz)

For Sandbox (Testing)

  1. Register for SSLCommerz Sandbox Account

  2. Get Credentials

  3. Add to .env:

    SSLCOMMERZ_STORE_ID=test123456  # Your sandbox store ID
    SSLCOMMERZ_STORE_PASSWORD=test123456@ssl  # Your sandbox password
    SSLCOMMERZ_SANDBOX=true
  4. Test Credentials (Sandbox):

    # Default SSLCommerz sandbox credentials for testing
    SSLCOMMERZ_STORE_ID=testbox
    SSLCOMMERZ_STORE_PASSWORD=qwerty
    SSLCOMMERZ_SANDBOX=true

For Production

  1. Get Live Account

  2. Update .env:

    SSLCOMMERZ_STORE_ID=your_live_store_id
    SSLCOMMERZ_STORE_PASSWORD=your_live_password
    SSLCOMMERZ_SANDBOX=false  # Important: Set to false for production
  3. Configure IPN URL (Instant Payment Notification):

    • In SSLCommerz dashboard, set IPN URL to:
    https://yourdomain.com/payment/ipn
    

SSLCommerz Test Cards

For sandbox testing, use these test cards:

Card Type Card Number CVV Expiry Status
Visa 4242424242424242 123 Any future date Success
MasterCard 5555555555554444 123 Any future date Success
Amex 378282246310005 1234 Any future date Success
Decline 4000000000000002 123 Any future date Declined

Mobile Banking (Sandbox):

  • bKash: Use any 11-digit number starting with 01
  • Rocket: Use any 11-digit number starting with 01
  • Nagad: Use any 11-digit number starting with 01

Email Configuration

For development, use Mailtrap:

MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your_mailtrap_username
MAIL_PASSWORD=your_mailtrap_password

For production, use services like:

  • Gmail SMTP
  • SendGrid
  • Amazon SES
  • Mailgun

Line Ending Configuration (Windows)

# Configure Git to auto-convert line endings
git config core.autocrlf true

πŸ“š Usage

Default Login Credentials (After Seeding)

Role Email Password
Admin admin@example.com password
Teacher teacher@example.com password
Student student@example.com password

⚠️ Change these in production!

Authentication Routes

Role Login URL Register URL Dashboard URL
Student /login /register /dashboard
Teacher /teacher/login /teacher/register /teacher/dashboard
Admin /admin/login /admin/register /admin/dashboard

Student Workflow

  1. Register/Login β†’ Student portal
  2. View Courses β†’ See enrolled courses
  3. Request Transcript:
    • Fill request form
    • Make payment via SSLCommerz (supports bKash, Rocket, Nagad, Credit/Debit cards)
    • Track request status
  4. Download Marksheet β†’ PDF generation

Teacher Workflow

  1. Login β†’ Teacher portal
  2. Select Academic Period β†’ Choose year and term
  3. Search Student β†’ Find by ID/name
  4. Enter Marks:
    • Theory marks (CA, Semester, Total)
    • Lab marks
    • Special course marks
  5. Generate Marksheet β†’ Auto-calculate CGPA and create PDF
  6. View Reports β†’ Student performance analytics

Admin Workflow

  1. Login β†’ Admin panel
  2. Manage Users β†’ Add/edit students, teachers
  3. Configure Academic Year β†’ Set terms and dates
  4. Manage Courses β†’ Add/edit course catalog
  5. Process Requests:
    • Review transcript requests
    • Verify payments
    • Approve/reject requests
  6. Generate Reports β†’ Analytics dashboard

Payment Flow

Student β†’ Request Transcript β†’ SSLCommerz Payment Page
   ↓
Choose Payment Method (Card/bKash/Rocket/Nagad)
   ↓
Complete Payment β†’ SSLCommerz validates
   ↓
Success β†’ IPN callback β†’ Update request status
   ↓
Admin reviews β†’ Approve/Process transcript

πŸ“Š Database Schema

Core Tables

users (Students)
β”œβ”€β”€ id
β”œβ”€β”€ name
β”œβ”€β”€ email
β”œβ”€β”€ student_id (unique)
β”œβ”€β”€ academic_year_id
β”œβ”€β”€ term_id
└── timestamps

teachers
β”œβ”€β”€ id
β”œβ”€β”€ name
β”œβ”€β”€ email
β”œβ”€β”€ department
└── timestamps

admins
β”œβ”€β”€ id
β”œβ”€β”€ name
β”œβ”€β”€ email
└── timestamps

academic_years
β”œβ”€β”€ id
β”œβ”€β”€ year (e.g., "2024-2025")
β”œβ”€β”€ start_date
└── end_date

terms
β”œβ”€β”€ id
β”œβ”€β”€ academic_year_id
β”œβ”€β”€ name (e.g., "1st Term")
└── timestamps

courses
β”œβ”€β”€ id
β”œβ”€β”€ code (unique)
β”œβ”€β”€ name
β”œβ”€β”€ type (theory/lab/special)
β”œβ”€β”€ credit_hours
└── timestamps

enrollments
β”œβ”€β”€ id
β”œβ”€β”€ user_id
β”œβ”€β”€ course_id
β”œβ”€β”€ academic_year_id
β”œβ”€β”€ term_id
└── timestamps

theory_marks
β”œβ”€β”€ id
β”œβ”€β”€ user_id
β”œβ”€β”€ course_id
β”œβ”€β”€ academic_year_id
β”œβ”€β”€ term_id
β”œβ”€β”€ ca_marks
β”œβ”€β”€ semester_marks
β”œβ”€β”€ total_marks
└── timestamps

lab_marks
β”œβ”€β”€ id
β”œβ”€β”€ user_id
β”œβ”€β”€ course_id
β”œβ”€β”€ marks
└── timestamps

special_marks
β”œβ”€β”€ id
β”œβ”€β”€ user_id
β”œβ”€β”€ course_id
β”œβ”€β”€ marks
└── timestamps

marksheets
β”œβ”€β”€ id
β”œβ”€β”€ user_id
β”œβ”€β”€ academic_year_id
β”œβ”€β”€ term_id
β”œβ”€β”€ cgpa
β”œβ”€β”€ file_path
└── timestamps

transcript_requests
β”œβ”€β”€ id
β”œβ”€β”€ user_id
β”œβ”€β”€ request_date
β”œβ”€β”€ status (pending/approved/rejected)
β”œβ”€β”€ payment_status (pending/paid/failed)
β”œβ”€β”€ payment_id (SSLCommerz transaction ID)
β”œβ”€β”€ payment_method (card/bkash/rocket/nagad)
β”œβ”€β”€ session (academic year)
β”œβ”€β”€ amount
└── timestamps

Relationships

  • User hasMany Enrollments, Marks, TranscriptRequests
  • Course hasMany Enrollments, Marks
  • AcademicYear hasMany Terms, Users, Enrollments
  • Term belongsTo AcademicYear

πŸ”Œ API Documentation

Public Endpoints

GET  /api/courses
GET  /api/academic-years

Authenticated Endpoints (Require Bearer Token)

# Student
GET  /api/student/marks
GET  /api/student/transcripts
POST /api/student/transcript-request

# Teacher
POST /api/teacher/marks
GET  /api/teacher/students/{id}

# Admin
GET  /api/admin/users
POST /api/admin/courses
PUT  /api/admin/requests/{id}/approve

Payment Endpoints

# Initialize payment
POST /payment/checkout
{
  "request_id": 1,
  "amount": 500,
  "currency": "BDT"
}

# Payment success callback
POST /payment/success

# Payment failure callback
POST /payment/fail

# Payment cancel callback
POST /payment/cancel

# IPN (Instant Payment Notification)
POST /payment/ipn

Example Request

curl -X POST http://localhost:8000/api/teacher/marks \
  -H "Authorization: Bearer your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": 1,
    "course_id": 5,
    "ca_marks": 30,
    "semester_marks": 70
  }'

πŸ§ͺ Testing

# Run all tests
php artisan test

# Run specific test file
php artisan test tests/Feature/MarkEntryTest.php

# Run with coverage
php artisan test --coverage

# Run specific test method
php artisan test --filter=test_teacher_can_enter_marks

Writing Tests

Tests are located in tests/Feature and tests/Unit.

Example test:

public function test_student_can_request_transcript()
{
    $student = User::factory()->create();
    
    $response = $this->actingAs($student)
        ->post('/transcript-request', [
            'session' => '2024-2025',
            'payment_method' => 'sslcommerz'
        ]);
    
    $response->assertStatus(200);
    $this->assertDatabaseHas('transcript_requests', [
        'user_id' => $student->id
    ]);
}

πŸš€ Deployment

Deploy to Shared Hosting (cPanel)

  1. Upload files via FTP/File Manager
  2. Move public folder contents to public_html
  3. Update .env:
    APP_ENV=production
    APP_DEBUG=false
    APP_URL=https://yourdomain.com
    
    # SSLCommerz Production
    SSLCOMMERZ_SANDBOX=false
    SSLCOMMERZ_STORE_ID=your_live_store_id
    SSLCOMMERZ_STORE_PASSWORD=your_live_password
  4. Run migrations via SSH or cPanel Terminal:
    php artisan migrate --force
  5. Set folder permissions:
    chmod -R 755 storage bootstrap/cache

Deploy to VPS (Ubuntu/Nginx)

# Install dependencies
sudo apt update
sudo apt install php8.2 php8.2-fpm php8.2-mysql nginx composer

# Clone repository
cd /var/www
git clone https://github.com/SImunna00/transcript-management.git
cd transcript-management

# Install dependencies
composer install --optimize-autoloader --no-dev
npm install && npm run build

# Set permissions
sudo chown -R www-data:www-data storage bootstrap/cache
sudo chmod -R 775 storage bootstrap/cache

# Configure Nginx (create /etc/nginx/sites-available/transcript)
server {
    listen 80;
    server_name yourdomain.com;
    root /var/www/transcript-management/public;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-Content-Type-Options "nosniff";

    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}

# Enable site
sudo ln -s /etc/nginx/sites-available/transcript /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx

# Set up SSL with Let's Encrypt
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.com

Deploy to Heroku

# Install Heroku CLI
# Login to Heroku
heroku login

# Create app
heroku create transcript-management-app

# Add PostgreSQL
heroku addons:create heroku-postgresql:hobby-dev

# Set environment variables
heroku config:set APP_KEY=$(php artisan key:generate --show)
heroku config:set APP_ENV=production
heroku config:set APP_DEBUG=false
heroku config:set SSLCOMMERZ_STORE_ID=your_store_id
heroku config:set SSLCOMMERZ_STORE_PASSWORD=your_password
heroku config:set SSLCOMMERZ_SANDBOX=false

# Deploy
git push heroku main

# Run migrations
heroku run php artisan migrate --force

πŸ›‘οΈ Security

Pre-Production Checklist

  • Remove development files:

    rm public/file-explorer.php
    rm public/quick-access.html
    rm create-shortcut.bat
    rm navigate.bat
  • Update .env:

    APP_ENV=production
    APP_DEBUG=false
    APP_URL=https://yourdomain.com
    SSLCOMMERZ_SANDBOX=false
  • Change default passwords

  • Enable HTTPS (SSL certificate)

  • Configure firewall

  • Set up database backups

  • Enable error logging (not displaying)

  • Restrict file permissions:

    chmod -R 755 storage bootstrap/cache
    chmod 644 .env
  • Configure CORS if using API

  • Enable rate limiting

  • Set up monitoring (logs, uptime)

  • Whitelist SSLCommerz IPs for IPN callbacks

Security Best Practices

// Already implemented in the project:
- CSRF protection on all forms
- SQL injection prevention (Eloquent ORM)
- XSS protection (Blade escaping)
- Password hashing (bcrypt)
- Secure session management
- Input validation and sanitization
- Payment verification with SSLCommerz hash validation

πŸ”§ Troubleshooting

Common Issues

1. CRLF/LF Line Ending Warnings

# Solution: Configure Git
git config core.autocrlf true

2. Permission Denied Errors

# Linux/Mac
chmod -R 775 storage bootstrap/cache

# Windows (as Administrator)
icacls storage /grant Users:F /T

3. Class Not Found Errors

# Clear and rebuild autoload
composer dump-autoload
php artisan clear-compiled
php artisan config:clear
php artisan cache:clear

4. Database Connection Failed

# Check .env database settings
# For SQLite, ensure database file exists
touch database/database.sqlite

# For MySQL, verify credentials
php artisan config:clear

5. SSLCommerz Payment Errors

Error: "Store ID or Password incorrect"

# Verify credentials in .env
# For sandbox, use test credentials:
SSLCOMMERZ_STORE_ID=testbox
SSLCOMMERZ_STORE_PASSWORD=qwerty
SSLCOMMERZ_SANDBOX=true

# Clear config cache
php artisan config:clear

Error: "Payment gateway not responding"

# Check sandbox mode
SSLCOMMERZ_SANDBOX=true  # For testing

# Verify network connectivity
curl https://sandbox.sslcommerz.com/gwprocess/v4/api.php

Error: "IPN validation failed"

# Ensure IPN URL is publicly accessible
# Check logs: storage/logs/laravel.log
# Verify hash validation in PaymentController

6. 500 Internal Server Error

# Check logs
tail -f storage/logs/laravel.log

# Check file permissions
# Enable debug mode temporarily (local only!)
APP_DEBUG=true

7. Route Not Found

# Clear route cache
php artisan route:clear
php artisan route:cache

8. Assets Not Loading

# Rebuild assets
npm run build

# Create storage link
php artisan storage:link

Debug Commands

# Show all routes
php artisan route:list

# Check database connection
php artisan db:show

# View configuration
php artisan config:show database

# Clear all caches
php artisan optimize:clear

# Run queue workers (if using queues)
php artisan queue:work

# Test SSLCommerz connection
php artisan tinker
>>> app('sslcommerz')->makePayment([...]);

SSLCommerz Testing Tips

  1. Always use sandbox mode for development
  2. Test all payment methods: Card, bKash, Rocket, Nagad
  3. Test failure scenarios: Use decline test card
  4. Verify IPN callbacks: Check logs for webhook hits
  5. Test amount validation: Ensure minimum 10 BDT

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository

    # Click "Fork" on GitHub
  2. Create a feature branch

    git checkout -b feature/AmazingFeature
  3. Make your changes

    • Follow PSR-12 coding standards
    • Write tests for new features
    • Update documentation
  4. Commit your changes

    git commit -m 'Add some AmazingFeature'
  5. Push to the branch

    git push origin feature/AmazingFeature
  6. Open a Pull Request

    • Describe your changes
    • Reference related issues

Code Style

This project follows PSR-12 coding standards.

# Check code style
./vendor/bin/phpcs

# Auto-fix code style
./vendor/bin/phpcbf

Commit Message Convention

feat: Add new feature
fix: Fix bug
docs: Update documentation
style: Code style changes
refactor: Code refactoring
test: Add tests
chore: Maintenance tasks

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2025 SImunna00

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ‘¨β€πŸ’» Author

SImunna00

πŸ™ Acknowledgments

πŸ“ž Support

Need help? Here's how to get support:

SSLCommerz Support

πŸ“ˆ Project Stats

GitHub stars GitHub forks GitHub issues GitHub pull requests


Made with ❀️ by SImunna00

Last Updated: November 2025 | Version: 1.0.0

⭐ If you find this project helpful, please give it a star on GitHub!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages