A modern, reliable, and easy-to-use barcode-based attendance system designed for universities. This project is the frontend implementation, built with Vue.js and designed to provide a clean, professional, and user-friendly interface for both students and lecturers.
The UI is designed to be modern, clean, and academic-friendly. It features a dual-theme system, allowing users to switch between a light and a dark mode for optimal viewing comfort. The interface is fully responsive and built with a focus on clear visual hierarchy and high readability.
| Home | Student Login | Lecturer Login |
|---|---|---|
![]() |
![]() |
![]() |
| Student Homepage | Report Page |
|---|---|
![]() |
![]() |
| Home | Student Login | Lecturer Login |
|---|---|---|
![]() |
![]() |
![]() |
| Student Homepage | Report Page |
|---|---|
![]() |
![]() |
- Dual-Theme UI: Seamlessly switch between Light and Dark modes.
- Distinct User Portals: Separate login and dashboard experiences for Students and Lecturers.
- Lecturer Dashboard: A comprehensive view for lecturers to manage their courses, view student information, and track attendance in real-time.
- Course and Session Management: Create, update, and manage courses and attendance sessions.
- Barcode Scanning: Utilize the device's camera to scan student ID barcodes for quick and efficient attendance marking.
- Real-time Roster: View a live roster of students for each session, with instant updates as attendance is taken.
- Manual Attendance: Manually mark students as present or absent.
- Reporting: Generate and export attendance reports in Excel format.
- Student Dashboard: A personalized dashboard for students to monitor their attendance and academic standing.
- Attendance Tracking: View overall attendance statistics and a detailed history of attended and missed sessions.
- Attendance Heatmap: Visualize attendance patterns throughout the semester with an intuitive heatmap.
- Recent Activity: See a timeline of recent attendance activity.
- Authentication: Secure authentication for both lecturers and students using Supabase Auth.
- Modern Tech Stack: Built with Vue.js 3, Vite, and modern CSS for a fast and reliable experience.
- Framework: Vue.js 3
- Build Tool: Vite
- Backend: Supabase
- Routing: Vue Router
- State Management: Pinia
- Styling: Tailwind CSS & CSS with Variables for Theming
- Form Validation: VeeValidate & Yup
- Charts: Chart.js via vue-chartjs
- Barcode Scanning: QuaggaJS 2
- Barcode Generation: JsBarcode
- Excel Export: ExcelJS
- Linting: ESLint
- Unit Testing: Vitest & Vue Test Utils
- E2E Testing: Playwright
To get the frontend running locally, follow these steps:
-
Clone the repository:
git clone https://github.com/Zakir176/BAS-Web.git cd BAS-Web -
Navigate to the project directory: The Vue.js project is located in the
BASsub-directory.cd BAS -
Install dependencies:
npm install
Node version: Requires Node
^20.19.0or>=22.12.0. -
Set up environment variables: Create a
.envfile in theBASdirectory by copying the example file. Then, fill in the required Supabase URL and anonymous key.# macOS / Linux cp .env.example .env # Windows (Command Prompt) copy .env.example .env # Windows (PowerShell) Copy-Item .env.example .env
Open
.envand set:VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Run the development server:
npm run dev
The application will be available at the local address provided by Vite (e.g., http://localhost:5173).
This project uses Vitest for unit/component tests and Playwright for end-to-end (E2E) integration tests.
# Run tests in watch mode
npm run test
# Run tests once (CI mode)
npm run test:run
# Run with interactive UI
npm run test:ui
# Run with coverage report
npm run test:coverageUnit test files are co-located in BAS/src/test/.
# Install Playwright browsers (first time only)
npx playwright install
# Run all E2E tests
npx playwright test
# Run a specific test file
npx playwright test tests/auth-redirect-integration.spec.tsE2E test files are located in BAS/tests/. Key test suites include:
auth-redirect-integration.spec.tsβ Auth flow and route guard integrationimproved-student-auth.spec.ts/improved-lecturer-auth.spec.tsβ Login/logout flowsbarcode-scanning.spec.tsβ Scanner functionality
Note: E2E tests require a running dev server and valid Supabase credentials in
.env. Seetests/global-setup.tsfor setup details.
BAS-Web/
βββ BAS/ # Vue.js application root
β βββ src/
β β βββ assets/ # Global styles and static assets
β β βββ components/ # Reusable Vue components
β β βββ core/ # Core abstractions
β β β βββ api/ # Supabase API wrappers
β β β βββ ui/ # Core UI primitives
β β βββ features/ # Feature-based modules
β β β βββ auth/ # Authentication views & logic
β β β βββ home/ # Landing/home page
β β β βββ lecturer/ # Lecturer dashboard & components
β β β βββ scanner/ # Barcode scanner feature
β β β βββ student/ # Student dashboard & components
β β β βββ legal/ # Terms, privacy, etc.
β β βββ router/ # Vue Router config & navigation guards
β β βββ services/ # Business logic / service layer
β β βββ shared/ # Shared utilities and composables
β β βββ stores/ # Pinia state stores
β β βββ views/ # Page-level route components
β β βββ main.js # App entry point
β βββ tests/ # Playwright E2E test suite
β βββ utils/ # Shared test helpers
β βββ global-setup.ts # Test environment setup
β βββ global-teardown.ts # Test environment teardown
βββ docs/ # Project documentation & UI screenshots
βββ ui/ # UI screenshots (light & dark mode)
βββ api.md # API reference
βββ components.md # Component documentation
βββ DEPLOYMENT.md # Deployment guide
βββ TROUBLESHOOTING.md # Common issues & FAQ
| Document | Description |
|---|---|
| API Reference | Supabase API wrappers and data layer |
| Component Docs | Reusable component reference |
| Deployment Guide | How to deploy to production |
| Troubleshooting Guide | Common fixes for scanner and connection issues |
This project is licensed under the MIT License.









