Skip to content

Commit e38a01d

Browse files
new readme
1 parent 01da927 commit e38a01d

File tree

10 files changed

+309
-13
lines changed

10 files changed

+309
-13
lines changed

README.md

Lines changed: 309 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,315 @@
1-
[![.github/workflows/build-and-deploy.yaml](https://github.com/IEEE-TAMU/portal/actions/workflows/build-and-deploy.yaml/badge.svg?branch=main)](https://github.com/IEEE-TAMU/portal/actions/workflows/build-and-deploy.yaml)
2-
# IeeeTamuPortal
1+
# IEEE TAMU Portal
32

4-
To start your Phoenix server:
3+
A comprehensive membership and event management system built with Phoenix LiveView for IEEE TAMU. The portal streamlines member registration, payment tracking, event management, and Discord integration for the IEEE student chapter at Texas A&M University.
54

6-
* Run `mix setup` to install and setup dependencies
7-
* Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`
5+
[![Build Status](https://github.com/IEEE-TAMU/portal/actions/workflows/build-and-deploy.yaml/badge.svg?branch=main)](https://github.com/IEEE-TAMU/portal/actions/workflows/build-and-deploy.yaml)
86

9-
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
7+
## Table of Contents
108

11-
Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html).
9+
- [Features](#features)
10+
- [Screenshots](#screenshots)
11+
- [Getting Started](#getting-started)
12+
- [Development Workflow](#development-workflow)
13+
- [Testing](#testing)
14+
- [Deployment](#deployment)
15+
- [API Documentation](#api-documentation)
1216

13-
## Learn more
17+
## Features
1418

15-
* Official website: https://www.phoenixframework.org/
16-
* Guides: https://hexdocs.pm/phoenix/overview.html
17-
* Docs: https://hexdocs.pm/phoenix
18-
* Forum: https://elixirforum.com/c/phoenix-forum
19-
* Source: https://github.com/phoenixframework/phoenix
19+
### Member Management
20+
21+
- **Self-Service Registration**: Members create accounts, verify emails, and complete onboarding
22+
- **Member Information System**: Track TAMU UIN, major, graduation year, t-shirt size, and more
23+
- **Payment Tracking**: Automated payment verification with University SOFC Flywire integration
24+
- **Resume Book**: Members upload PDFs for sponsor access; admins can bulk-export as ZIP
25+
- **OAuth Integration**: Link Discord and Google accounts for streamlined access
26+
27+
![Member Registration Flow](docs/screenshots/member-registration.png)
28+
*Member registration and information onboarding*
29+
30+
![Member Dashboard](docs/screenshots/member-dashboard.png)
31+
*Member dashboard showing registration status and upcoming events*
32+
33+
### Event Management
34+
35+
- **Event CRUD**: Admins create and manage events with location, time, and RSVP limits
36+
- **RSVP System**: Members can RSVP to events; capacity tracking prevents over-booking
37+
- **QR Code Generation**: Each event gets a unique RSVP QR code for easy member sign-ups
38+
- **Calendar Integration**: Public iCalendar feed at `/api/v1/calendar` for external apps
39+
40+
![Event Management](docs/screenshots/admin-events.png)
41+
*Admin event management interface*
42+
43+
![Event RSVP Modal](docs/screenshots/event-rsvp.png)
44+
*Member RSVP modal with event details*
45+
46+
### Check-In System
47+
48+
- **QR Code Scanning**: Real-time camera-based QR scanning for member check-ins
49+
- **Event-Specific Check-Ins**: Track attendance per event throughout the academic year
50+
- **Live Updates**: WebSocket-powered notifications when members are checked in
51+
- **CSV Export**: Download check-in records for individual events or entire year
52+
53+
![QR Check-In](docs/screenshots/admin-checkin.png)
54+
*Admin check-in interface with live QR scanner*
55+
56+
![Member Check-In QR](docs/screenshots/member-checkin-qr.png)
57+
*Member's personal check-in QR code*
58+
59+
### Discord Integration
60+
61+
- **Automatic Role Management**: Members who link Discord and pay dues automatically receive the "Member" role
62+
- **OAuth Linking**: One-click Discord account connection via OAuth2
63+
- **Role Sync Service**: Background job ensures roles stay synchronized with payment status
64+
- **Admin API**: RESTful endpoints for bulk role assignment and management
65+
- **Real-Time Updates**: Role changes trigger immediately when payment status changes
66+
67+
![Discord Integration](docs/screenshots/discord-settings.png)
68+
*Member settings showing Discord account linking*
69+
70+
See the full [Discord Role Management documentation](lib/ieee_tamu_portal/discord/DISCORD_ROLE_MANAGEMENT.md) for technical details.
71+
72+
### Admin Panel
73+
74+
- **Member Directory**: Browse, filter, and manage all members with [Flop](https://hex.pm/packages/flop) pagination
75+
- **Payment Override**: Manually mark members as paid when needed
76+
- **Resume Management**: Preview uploaded resumes and bulk download
77+
- **Event Analytics**: View RSVP and check-in counts per event
78+
- **API Key Management**: Generate and revoke API keys for external integrations
79+
- **Settings Management**: Configure registration year and current event
80+
81+
![Admin Dashboard](docs/screenshots/admin-dashboard.png)
82+
*Admin dashboard with key metrics*
83+
84+
![Admin Members](docs/screenshots/admin-members.png)
85+
*Member directory with filtering and search*
86+
87+
### API
88+
89+
- **OpenAPI Specification**: Auto-generated docs at `/api/openapi`
90+
- **Calendar Feed**: Public iCalendar endpoint for event subscriptions
91+
- **Discord Roles API**: Programmatic role management for bulk operations
92+
- **Payment Webhooks**: Receive and process Flywire payment notifications
93+
94+
95+
## Getting Started
96+
97+
### Prerequisites
98+
99+
- [Nix](https://nixos.org/download.html) with flakes enabled
100+
- [direnv](https://direnv.net/) (optional but recommended)
101+
102+
### Setup
103+
104+
1. **Clone the repository**
105+
```sh
106+
git clone https://github.com/IEEE-TAMU/portal.git
107+
cd portal
108+
```
109+
110+
2. **Activate the development environment**
111+
112+
With `direnv`:
113+
```sh
114+
direnv allow
115+
```
116+
117+
Without `direnv`:
118+
```sh
119+
nix develop --extra-experimental-features "nix-command flakes"
120+
```
121+
122+
3. **Start background services**
123+
```sh
124+
devenv up
125+
```
126+
127+
This starts MariaDB and other services defined in [flake.nix](flake.nix).
128+
129+
4. **Bootstrap the application**
130+
```sh
131+
mix setup
132+
```
133+
134+
The [`mix setup`](mix.exs) alias:
135+
- Installs dependencies
136+
- Creates and migrates the database
137+
- Seeds initial data (including test accounts)
138+
- Prepares frontend assets (Tailwind CSS + esbuild)
139+
140+
5. **Start the Phoenix server**
141+
```sh
142+
iex -S mix phx.server
143+
```
144+
145+
Visit [http://localhost:4000](http://localhost:4000)
146+
147+
### Test Accounts
148+
149+
After running `mix setup`, the following test accounts are available:
150+
151+
- **Test Member**: `test@tamu.edu` / `password`
152+
- **Admin Panel**:
153+
`admin` / `password`
154+
155+
## Development Workflow
156+
157+
### Asset Compilation
158+
159+
Assets are automatically compiled and watched when running `mix phx.server`. Manual builds:
160+
161+
```sh
162+
# Development build
163+
mix assets.build
164+
165+
# Production build (minified)
166+
mix assets.deploy
167+
```
168+
169+
### Database Management
170+
171+
```sh
172+
# Create and migrate
173+
mix ecto.create
174+
mix ecto.migrate
175+
176+
# Reset database
177+
mix ecto.reset
178+
179+
# Seed data
180+
mix run priv/repo/seeds.exs
181+
```
182+
183+
### Code Quality
184+
185+
```sh
186+
# Format code
187+
mix format
188+
```
189+
190+
## Testing
191+
192+
```sh
193+
# Run all tests
194+
mix test
195+
196+
# Run with coverage
197+
mix test --cover
198+
199+
# Run specific test file
200+
mix test test/ieee_tamu_portal_web/live/member_login_live_test.exs
201+
```
202+
203+
The test suite automatically creates and migrates the test database on first run.
204+
205+
## Deployment
206+
207+
### Docker
208+
209+
Build the Docker image using Nix:
210+
211+
```sh
212+
nix build .#packages.x86_64-linux.docker
213+
docker load < result
214+
```
215+
216+
### Environment Variables
217+
218+
Required production environment variables:
219+
220+
```bash
221+
# Database
222+
DATABASE_URL=ecto://user:pass@localhost/ieee_tamu_portal_prod
223+
POOL_SIZE=10
224+
225+
# Web
226+
SECRET_KEY_BASE=<generate with mix phx.gen.secret>
227+
PHX_HOST=portal.ieeetamu.org
228+
229+
# S3/R2 Storage (for resume uploads)
230+
CLOUDFLARE_ACCOUNT_ID=<your-account-id>
231+
CLOUDFLARE_BUCKET_NAME=<your-bucket>
232+
CLOUDFLARE_ACCESS_KEY_ID=<your-access-key>
233+
CLOUDFLARE_SECRET_ACCESS_KEY=<your-secret>
234+
235+
# OAuth
236+
DISCORD_CLIENT_ID=<your-discord-client-id>
237+
DISCORD_CLIENT_SECRET=<your-discord-client-secret>
238+
GOOGLE_CLIENT_ID=<your-google-client-id>
239+
GOOGLE_CLIENT_SECRET=<your-google-client-secret>
240+
241+
# Discord Bot Integration
242+
DISCORD_BOT_URL=https://your-discord-bot.example.com
243+
244+
# Admin Panel
245+
ADMIN_USERNAME=admin
246+
ADMIN_PASSWORD=<secure-password>
247+
```
248+
249+
### CI/CD
250+
251+
The project uses GitHub Actions for automated builds and deployments. See [.github/workflows/build-and-deploy.yaml](.github/workflows/build-and-deploy.yaml) for the full pipeline.
252+
253+
## API Documentation
254+
255+
### OpenAPI Specification
256+
257+
Interactive API docs are available at `/api/openapi` when the server is running.
258+
259+
### Calendar Feed
260+
261+
Subscribe to the public event calendar:
262+
263+
```
264+
https://portal.ieeetamu.org/api/v1/calendar
265+
```
266+
267+
### Discord Role Management
268+
269+
Bulk role assignment using CSV:
270+
271+
```sh
272+
mix discord.roles.assign https://portal.ieeetamu.org $API_KEY roles.csv
273+
```
274+
275+
See [Discord Role Management documentation](lib/ieee_tamu_portal/discord/DISCORD_ROLE_MANAGEMENT.md) for complete API details.
276+
277+
## Project Structure
278+
279+
```
280+
├── assets/ # Frontend assets (JS, CSS)
281+
├── config/ # Application configuration
282+
├── lib/
283+
│ ├── ieee_tamu_portal/ # Core business logic
284+
│ │ ├── accounts/ # Member accounts and auth
285+
│ │ ├── discord/ # Discord integration
286+
│ │ ├── events/ # Event and RSVP management
287+
│ │ ├── members/ # Member info and registrations
288+
│ │ └── services/ # Service layer (file storage, etc.)
289+
│ └── ieee_tamu_portal_web/ # Web layer (LiveView, controllers)
290+
│ ├── api/ # REST API controllers
291+
│ ├── components/ # Reusable UI components
292+
│ └── live/ # LiveView modules
293+
├── priv/
294+
│ ├── repo/migrations/ # Database migrations
295+
│ └── static/ # Static assets
296+
└── test/ # Test suite
297+
```
298+
299+
## Contributing
300+
301+
1. Fork the repository
302+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
303+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
304+
4. Push to the branch (`git push origin feature/amazing-feature`)
305+
5. Open a Pull Request
306+
307+
<!-- ## License
308+
309+
This project is maintained by IEEE TAMU. See [LICENSE](LICENSE) for details. -->
310+
311+
## Support
312+
313+
For questions or issues:
314+
- Open a [GitHub Issue](https://github.com/IEEE-TAMU/portal/issues)
315+
- Contact the IEEE TAMU officers at portal@ieeetamu.org

docs/screenshots/admin-checkin.png

248 KB
Loading
166 KB
Loading

docs/screenshots/admin-events.png

302 KB
Loading

docs/screenshots/admin-members.png

142 KB
Loading
141 KB
Loading

docs/screenshots/event-rsvp.png

174 KB
Loading
132 KB
Loading
227 KB
Loading
93.2 KB
Loading

0 commit comments

Comments
 (0)