Web application for the Augustana Students' Association (ASA) to manage, display, and provide access to organizational policies and bylaws.
Live Site: https://asa-policy-frontend.vercel.app
- Policy Browsing: View and browse active policies organized by sections:
- Organizational Identity & Values
- Governance & Elections
- Operations, Staff & Finance
- Bylaws Access: Browse and download ASA bylaws in PDF format
- Student Suggestions: Submit policy suggestions with email verification
- Search Functionality: Search across policies and bylaws
- Real-time Updates: Automatic polling for newly approved policies
- Policy Details: View detailed policy information with PDF download capability
- Contact Information: Access ASA contact details and office hours
- Policy Management: Create, edit, approve, and delete policies
- Bylaw Management: Create, edit, approve, and delete bylaws
- Suggestion Management: Review and manage student suggestions
- Approval Workflow: Approve or disapprove pending policies and bylaws
- Dashboard: Overview of all policies, bylaws, and suggestions
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- Styling: Custom CSS with responsive design
- PDF Generation: jsPDF library
- API: RESTful API integration
- Hosting: Vercel
- Backend: asa-policy-backend
asa-policy-frontend/
├── public/ # Public-facing pages
│ ├── policies.html # Main policies page
│ ├── policy-detail.html # Individual policy detail page
│ ├── bylaws.html # Bylaws listing page
│ ├── bylaw-detail.html # Individual bylaw detail page
│ ├── suggestions.html # Student suggestions form
│ └── contact.html # Contact information page
├── admin/ # Admin dashboard pages
│ ├── login.html # Admin login
│ ├── dashboard.html # Admin dashboard
│ ├── policies.html # Policy management
│ ├── bylaws.html # Bylaw management
│ └── ... # Other admin pages
├── css/ # Stylesheets
│ ├── style.css # Main stylesheet
│ ├── admin.css # Admin-specific styles
│ └── responsive.css # Responsive design styles
├── js/ # JavaScript files
│ ├── public/ # Public-facing JavaScript
│ │ ├── policies.js # Policies page logic
│ │ ├── bylaws.js # Bylaws page logic
│ │ └── suggestions.js # Suggestions form logic
│ └── admin/ # Admin JavaScript
│ ├── login.js # Admin authentication
│ ├── policies.js # Policy management
│ ├── bylaws.js # Bylaw management
│ └── ... # Other admin scripts
├── assets/ # Static assets
│ ├── asalogo.png # ASA logo
│ └── ASABylaws.pdf # Bylaws PDF document
├── vercel.json # Vercel configuration
└── README.md # This file
- A modern web browser (Chrome, Firefox, Safari, Edge)
- Node.js (optional, for local development)
- Git
-
Clone the repository
git clone https://github.com/your-username/asa-policy-frontend.git cd asa-policy-frontend -
Open in a web server
Since this is a static site, you can use any local web server:
Using Python:
python -m http.server 8000
Using Node.js (http-server):
npx http-server -p 8000
Using VS Code Live Server:
- Install the "Live Server" extension
- Right-click on
public/policies.htmland select "Open with Live Server"
-
Access the application
- Open your browser and navigate to
http://localhost:8000/public/policies.html
- Open your browser and navigate to
The frontend connects to a backend API. By default, it uses:
https://asa-policy-backend.onrender.com
To configure a different API endpoint, you can set it in the browser console:
window.API_BASE_URL = 'https://your-api-url.com';Or modify the API_BASE_URL constant in the JavaScript files:
js/public/policies.jsjs/public/bylaws.jsjs/public/suggestions.js
This project is configured for deployment on Vercel:
-
Connect your repository to Vercel
- Import your GitHub repository in the Vercel dashboard
- Vercel will automatically detect the project
-
Configure build settings
- Framework Preset: Other
- Output Directory:
.(root directory) - Build Command: (leave empty for static sites)
- Install Command: (leave empty)
-
Environment Variables (if needed)
- Add any required environment variables in Vercel dashboard
-
Deploy
- Vercel will automatically deploy on every push to the main branch
The vercel.json file configures routing:
- Root URL (
/) redirects to/public/policies.html
The frontend expects the following backend API endpoints:
GET /api/policies/approved- Get all approved policiesGET /api/policies/approved?section={sectionName}- Get policies by sectionGET /api/policies/{policy_id}- Get specific policy by ID
GET /api/bylaws/approved- Get all approved bylawsGET /api/bylaws/{bylaw_id}- Get specific bylaw by ID
POST /api/suggestions- Submit a new suggestion
POST /api/admin/login- Admin loginGET /api/admin/policies- Get all policies (admin)POST /api/admin/policies- Create new policyPUT /api/admin/policies/{id}- Update policyDELETE /api/admin/policies/{id}- Delete policy- Similar endpoints for bylaws and suggestions
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is developed for the Augustana Students' Association.
For questions or support, please contact:
- Email: augsa@ualberta.ca
- Website: https://asa.su.ualberta.ca/
- Phone: (780) 679-1541
- Developed for the Augustana Students' Association
- Built with modern web technologies
- Hosted on Vercel