mirror of
https://github.com/ClaperCo/Claper.git
synced 2026-02-24 04:01:04 +01:00
## ⚠️ Breaking changes - S3 variables are now named: S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, S3_REGION and S3_BUCKET - Users now have roles. Refer to the `roles` table and assign a role to a user with the `role_id` column in the `users` table. ## Features - Add Admin Panel to manage users and presentations - Add user roles: user, admin - Add `LANGUAGES` setting to configure available languages in the app - Add hideable presenter attendee count (#183 #155) - Add Hungarian translation (#161) - Add Latvian translation (#163) - Add custom S3 endpoint with `S3_SCHEME`, `S3_HOST`, `S3_PORT` and `S3_PUBLIC_URL` ## Fixes and improvements - Upgrade JS dependencies - Upgrade Elixir dependencies, including Phoenix Live View to 1.0.17 - Upgrade to Tailwind 4+ - Refactor view templates to use {} instead of <%= %> - Fix event name validation to be required - Docker image is now using Ubuntu instead of Alpine for better dependencies support - Fix scrollbar not showing in event manager when no presentation file (#164) (@aryel780) - Fix settings scroll for small screen (#168) - Fix duplicate key quiz when duplicate (#182) - Fix email change confirmation (#172) - Fix italian translation (#179) - Fix random poll choices (#184)
3.0 KiB
3.0 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Common Development Commands
Setup and Dependencies
# Install dependencies
mix deps.get
mix setup # Runs deps.get + ecto.setup
# Setup database
mix ecto.setup # Creates DB, runs migrations, seeds
mix ecto.reset # Drops DB and runs ecto.setup
# Install frontend dependencies
cd assets && npm install && cd ..
Running the Application
# Start Phoenix server
mix phx.server
# Or inside IEx
iex -S mix phx.server
Testing
# Run tests
mix test
# Run specific test file
mix test test/path/to/test_file.exs
# Run test with specific line number
mix test test/path/to/test_file.exs:42
Code Quality
# Format code
mix format
# Run Credo for code analysis
mix credo
Building Assets
# For production deployment
mix assets.deploy
High-Level Architecture
Claper is an interactive presentation platform built with Phoenix Framework and Elixir. It enables real-time audience interaction during presentations through polls, forms, messages, and quizzes.
Core Components
-
Phoenix LiveView Architecture
- Real-time updates without JavaScript through WebSocket connections
- LiveView modules in
lib/claper_web/live/handle interactive UI - Presence tracking for real-time user counts
-
Main Domain Contexts (in
lib/claper/)Accounts- User management, authentication, OIDC integrationEvents- Core presentation/event managementPosts- Audience messages and reactionsPolls- Interactive polls with real-time votingForms- Custom forms for audience feedbackQuizzes- Quiz functionality with LTI supportPresentations- Slide management and state trackingEmbeds- External content embedding
-
Authentication & Authorization
- Multiple auth methods: email/password, OIDC
- Role-based access control with admin panel
- LTI 1.3 support for educational platforms
-
Real-time Features
- Phoenix PubSub for broadcasting updates
- Phoenix Presence for tracking online users
- LiveView for reactive UI without custom JavaScript
-
Background Jobs
- Oban for background job processing
- Email sending
-
Frontend Stack
- Tailwind CSS for styling (with DaisyUI components)
- Alpine.js for minimal JavaScript interactions
- esbuild for JavaScript bundling
- Separate admin and user interfaces
-
Key LiveView Modules
EventLive.Show- Attendee viewEventLive.Presenter- Presenter control viewEventLive.Manage- Event management interfaceAdminLive.*- Admin panel components
-
Database Structure
- PostgreSQL with Ecto
- Key models: User, Event, Post, Poll, Quiz, PresentationState
- Soft deletes for users
- UUID-based public identifiers
-
LTI Integration
- LTI 1.3 support for quizzes, publish score to LMS
- LTI launch handling in
LtiController