A modern web application for managing barangay document applications and services in Las PiΓ±as City, Metro Manila.
- User Registration & Authentication - Secure account creation and login
- Document Applications - Apply for various barangay documents online
- Application Tracking - Real-time status updates with tracking numbers
- Dashboard - Personal overview of applications and account status
- Document Download - Download completed documents digitally
- Admin Panel - Comprehensive management dashboard
- Application Processing - Review, approve, or reject applications
- User Management - Manage resident accounts and permissions
- Reports & Analytics - Generate reports and view system statistics
- Document Type Management - Configure available documents and requirements
- Barangay Clearance (β±50) - Certificate of good standing
- Certificate of Indigency (Free) - For low-income families
- Business Permit (β±500) - Permit to operate business
- Certificate of Residency (β±30) - Proof of residence
- Barangay ID (β±100) - Official barangay identification
- Frontend Framework: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS with custom design system
- UI Components: shadcn/ui
- Routing: React Router v6
- Form Handling: React Hook Form with Zod validation
- State Management: React Context + Local Storage
- Icons: Lucide React
- Notifications: Sonner
The application uses a Philippine government-inspired color scheme with:
- Primary Colors: Blues and greens representing civic trust
- Typography: Clear, accessible fonts for government services
- Components: Consistent UI patterns following shadcn/ui design principles
- Responsive Design: Mobile-first approach for accessibility
src/
βββ components/ # Reusable UI components
β βββ ui/ # shadcn/ui components
β βββ forms/ # Form-specific components
β βββ dashboard/ # Dashboard-specific components
βββ pages/ # Page components
β βββ Index.tsx # Landing page
β βββ Login.tsx # Authentication
β βββ Register.tsx # User registration
β βββ Dashboard.tsx # User dashboard
β βββ Applications.tsx # Application management
β βββ Admin.tsx # Admin panel
βββ hooks/ # Custom React hooks
β βββ useAuth.ts # Authentication logic
βββ lib/ # Utility libraries
β βββ validations.ts # Zod validation schemas
βββ types/ # TypeScript type definitions
β βββ index.ts # Application types
βββ utils/ # Helper functions
β βββ constants.ts # Application constants
β βββ helpers.ts # Utility functions
βββ main.tsx # Application entry point
- Node.js 18+ and npm
- Modern web browser
Create a .env file in the project root with your Supabase credentials:
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_keyReplace your_supabase_url and your_supabase_anon_key with the values from your Supabase project. Do not share or commit your real keys publicly.
The app uses Vite, so these variables are available as import.meta.env.VITE_SUPABASE_URL and import.meta.env.VITE_SUPABASE_ANON_KEY in the code.
-
Clone the repository
git clone <repository-url> cd barangay-document-management
-
Install dependencies
npm install
-
Start development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173
For testing purposes, the application includes mock authentication:
- Regular User: Any email/password combination
- Admin User: Use email containing "admin" (e.g., admin@example.com)
Currently implements frontend-only authentication with localStorage for demo purposes. For production deployment:
- Integrate with Supabase for backend authentication
- Implement proper JWT token validation
- Add password hashing and security measures
- Set up role-based access control (RBAC)
- β User registration and authentication
- β Document application forms
- β Application tracking system
- β Admin panel for processing
- β Responsive design
- Backend integration with Supabase
- File upload for document attachments
- Email notifications for status updates
- Digital document generation (PDF)
- Payment integration for fees
- Mobile app development
- Digital signatures
- Appointment scheduling
- SMS notifications
- Advanced reporting and analytics
This application is designed to integrate with Supabase for production use:
-- Users table
users (
id UUID PRIMARY KEY,
email TEXT UNIQUE,
first_name TEXT,
last_name TEXT,
middle_name TEXT,
contact_number TEXT,
address TEXT,
role TEXT DEFAULT 'resident',
is_active BOOLEAN DEFAULT true,
created_at TIMESTAMP,
updated_at TIMESTAMP
)
-- Document types table
document_types (
id UUID PRIMARY KEY,
name TEXT,
description TEXT,
requirements TEXT[],
fee DECIMAL,
processing_time TEXT,
is_active BOOLEAN DEFAULT true
)
-- Applications table
applications (
id UUID PRIMARY KEY,
user_id UUID REFERENCES users(id),
document_type_id UUID REFERENCES document_types(id),
purpose TEXT,
status TEXT DEFAULT 'pending',
submitted_at TIMESTAMP,
processed_at TIMESTAMP,
completed_at TIMESTAMP,
processed_by UUID REFERENCES users(id),
rejection_reason TEXT,
tracking_number TEXT UNIQUE
)npm run devThe Supabase client is initialized in src/lib/supabaseClient.ts:
import { createClient } from '@supabase/supabase-js';
const supabaseUrl = import.meta.env.VITE_SUPABASE_URL as string;
const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY as string;
export const supabase = createClient(supabaseUrl, supabaseAnonKey);You can now import and use supabase throughout your app for authentication, database, and storage operations.
npm run build
npm run preview- Vercel: Automatic deployment from Git
- Netlify: Static site hosting
- GitHub Pages: Free hosting for public repositories
This project is intended for educational and demonstration purposes. For production use in actual government services, ensure compliance with local regulations and data privacy laws.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
For questions or support regarding this document management system:
- Barangay Office: Monday to Friday, 8:00 AM - 5:00 PM
- Contact: +63 2 8872-1234
- Email: almanzados@laspinas.gov.ph
Barangay Almanza Dos - Serving the community with modern, efficient digital services.