Komplenin is a Flet-based application that helps citizens submit, track, and discuss public issues with the local government. The codebase follows a lightweight MVC approach: controllers hold the business logic, DAOs/entities handle SQLite persistence, and Flet views render the UI.
- Authentication & sessions with role-based access (citizen, governement, guest).
- Issue submission workflow including media upload, validation, and status lifecycle.
- Beranda feed with search, sort, filter, support votes, and solution votes.
- Detail dialog combining full issue metadata, edit/delete actions, comment thread, and status updates.
- Reusable UI components (confirmation popups, issue cards, reaction buttons, headers, etc.).
- Python 3.10+
- Flet for cross-platform UI
- SQLite (
src/database/komplenin.db) for persistence - Pillow (PIL) for image resizing/conversion
-
Clone & setup environment
git clone https://github.com/Irvin-Tandiarrang-Sumual/IF2150-2025-K01-G10-Komplenin cd IF2150-2025-K01-G10-Komplenin python -m venv .venv .venv\Scripts\activate # Windows pip install -r requirements.txt
-
Seed the database (optional but recommended)
cd src/database python seed.py- Generates
komplenin.db, demo users, and sample images indatabase/images. - Do not commit generated DB/files to version control.
- Generates
-
Run the app
cd src python main.pyFlet will open a desktop window (or browser tab) displaying the Komplenin UI.
doc/
citizen/
Authentication
Beranda
Laporkan
Profil
Riwayat Aktivitas
government/
guest/
landing-page
src/
main.py # Entry point (Flet app)
controllers/ # Authentication, issue reports, votes, session, etc.
models/dao/ # SQLite data access layer
models/entities/ # Domain entities
views/ # Screens + reusable Flet components
database/ # komplenin.db, schema.sql, seed.py, images/
assets/ # Fonts and logos
requirements.txt
README.md
- Inspect the SQLite DB via CLI:
cd src/database sqlite3 komplenin.db .header on .mode column SELECT national_id, password, government_id, role FROM users;
- Use
.schemaor openschema.sqlto see all table definitions. - If
database/images/issue_reportsis missing, rerunseed.pyto rebuild demo assets.
-
users
Stores authenticated actors. Columns:national_id,government_id,name,password,role(citizen/government),image_path, andis_registered. -
issue_reports
Core report entity submitted by citizens. Columns:user_id,title,description,category(enum of 6 values),location,upload_time, andimage_path. -
issue_report_statuses
History of status transitions per report. Columns:issue_report_id,update_time,status(e.g.,diterima,sedang diverifikasi,solusi telah diimplementasikan, etc.). Each insert represents a timeline entry. -
comments
Threaded discussion for each report. Columns:user_id,issue_report_id,content,upload_time.issue_report_idcascades on delete. -
support_votes
Citizens can support an issue once. Columns:user_id,issue_report_id. Cascades on issue deletion. -
solution_votes
Citizens vote on whether the provided solution was helpful. Columns:user_id,issue_report_id,vote_type(1= up,-1= down).
- Popups/dialogs follow the pattern used in
views/components/popup_confirmation.pyandissue_report_detail_view.py(attach topage.overlay, then toggleopen). - Styling constants live in
src/theme.pyand are reused across components. - Session-aware interactions (support votes, commenting, editing) rely on
SessionController. Make sure a user is logged in when testing citizen-only flows.
- Popup not visible → Ensure the dialog was appended to
page.overlaybefore callingopen = True. - Image upload fails → Check file type (
jpg/png) and size ≤ 10 MB; verify write permissions forsrc/database/images/issue_reports. - Role restrictions → Seed the DB again or log in with the appropriate role to access protected actions.
-
Beranda
-
Issue Report Detail
-
User Account Management
-
Upload Issue Report
-
Reaction to Issue Report (Support Vote, Comment, Solution Vote)
-
Dashboard
-
Issue Report Status Management
- 13524049 - Arina Azka
- 13524009 - Mikhael Benrael Tampubolon
- 13524021 - Natanael I Manurung
- 13524029 - Niko Samuel Simanjuntak
- 13524030 - Irvin Tandiarrang Sumual