Skip to content

refactor: split views, reorganize CSS, add docs for new contributors#437

Open
gerardm27 wants to merge 7 commits into
masterfrom
refactor-codebase
Open

refactor: split views, reorganize CSS, add docs for new contributors#437
gerardm27 wants to merge 7 commits into
masterfrom
refactor-codebase

Conversation

@gerardm27
Copy link
Copy Markdown

@gerardm27 gerardm27 commented Apr 3, 2026

Summary

Structural refactor to make the codebase easier for new organizers. No logic changes, only code moved around hehe.

Views splitting

Six monolithic views.py files converted to views/ packages, split by feature concern:

App Files
organizers lists.py, review.py, batch_ops.py
applications hacker.py, mentor.py, sponsor.py, draft.py
reimbursement hacker.py, organizer.py
user authentication.py, profile.py
baggage hacker.py, volunteer.py
hardware hacker.py, admin.py

CSS reorganization

  • custom-bootstrap.css (was 1.5k lines) split into 14 component files under app/static/css/bootstrap-overrides/
  • App-specific styles extracted from main.css into stats/static/css/stats.css and organizers/static/css/organizers.css

Documentation

New docs/ folder with four guides for new webdev organizers:

  • docs/getting-started.md — what the app does, app-by-app overview, URL map, where templates and styles live
  • docs/setting-up.md — local dev setup (extracted from README)
  • docs/contributing.md — worked examples for the most common yearly changes (add/remove a form field, change the reimbursement cap)
  • docs/email-templates.md — full table of every email the system sends, how to edit content and subjects, how to add template variables

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hacker name is missleading, this are generic classes for applications

Comment thread applications/views/hacker.py Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not hacker related. Same as file name, is for different types of applications (mentor, hacker, volunteer)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would rename it to mentorConverter to be more specific to what it does

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmiarons all files under applications/views/ are domain-specific. By renaming applications/views/hacker.py to application.py, now mentor.py and sponsor.py read as an extension to that flow, so the name is valid imho

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

batch_ops? invite.py may be more accurate since it is for inviting hackers to the event

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lists is missleading. organizer dashboard or tabs may be more accurate for the purpose of this view

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renaming to application_lists.py, will be updated in another PR

gerardm27 and others added 2 commits May 21, 2026 16:35
Addresses code review feedback:
- applications/views/hacker.py → application.py (contains dispatch for hacker, volunteer, and mentor; not hacker-only)
- class HackerDashboard → ApplicationDashboard
- class HackerApplication → ApplicationEditView (also avoids shadowing the HackerApplication model)
- organizers/views/batch_ops.py → invite.py (file contains only InviteTeamListView)
- organizers/views/lists.py → application_lists.py (more specific than "lists")

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants