-
Notifications
You must be signed in to change notification settings - Fork 36
Home
Formbar.js is a comprehensive classroom management and polling system that provides real-time interaction between teachers and students. The system features a digital currency economy (Digipogs), advanced polling capabilities, timer systems, and extensive classroom management tools.
- Getting Started
- Account Management
- Class Setup
- Core Features
- Teacher Controls
- Student Interface
- Digipog Economy
- Advanced Features
- Technical Setup
- API Documentation
- Node.js 18 or higher recommended for the backend
- Node.js 20.19 or higher recommended for the official TypeScript frontend
- Modern web browser
- Internet connection for real-time features
Formbar is now split into two repositories. The backend API/socket server lives in Formbar.js; the official frontend lives in Formbar.ts-client.
Backend:
git clone https://github.com/csmith1188/Formbar.js.git
cd Formbar.js
npm install
npm run init-db
npm run migrate
npm startFrontend:
git clone https://github.com/csmith1188/Formbar.ts-client.git
cd Formbar.ts-client
npm install
cp .env-template .env
npm run devSet VITE_FORMBAR_API_URL in the frontend .env to the backend URL, for example http://localhost:420.
-
Backend configuration: Make a copy of the backend
.env-template, rename it to.env, and configure server settings. -
Frontend configuration: Make a copy of the frontend
.env-template, rename it to.env, and setVITE_FORMBAR_API_URLto the backend address. -
Start Backend: Run
npm startinFormbar.js. -
Start Frontend: Run
npm run devinFormbar.ts-client. -
Access: Navigate to the frontend dev URL, usually
http://localhost:5173.
- Navigate to the login page
- Click "New Account"
- Enter your desired username and password
- Click "Create Account" to register
- You'll be automatically logged in after account creation
- Enter your username and password
- Click "Log In"
- If you forget your password, use the "Forgot password" feature
- Students: Can join classes, participate in polls, request help/breaks, earn digipogs, manage pools, and transfer digipogs
- Mods: Can manage many classroom workflows such as polls, help tickets, breaks, tags, links, and poll sharing
- Teachers: Can create classes, manage sessions/students, award digipogs, control timers, and manage classroom settings
- Managers: Full system access including user management, logs, IP controls, and global administration
Internally, modern Formbar uses roles and scopes. Numeric permission levels are still returned for compatibility, but class access is now role-based.
- After logging in as a teacher, you'll see the class creation page
- Enter your class name in the text field
- Click "Create" to create and automatically join the class
- If you have existing classes, use the dropdown to select and join them
- Share the class code with your students
- After logging in as a student, you'll see the class selection page
- Enter the class code provided by your teacher
- Click "Submit" to join the class
- You'll be redirected to the student interface
After logging in, you'll see these options at the top:
- Formbar: Main interface (Control Panel for teachers, Virtual Bar for students)
- Panel: Control Panel (teachers only)
- Plugins: Access to teacher-provided external links
- Leave Class: Exit current class
- Logout: Sign out of your account
- LM/DM: Toggle between Light Mode and Dark Mode
- Manager: System administration (managers only)
The Virtual Bar is a real-time visual representation of poll results:
- Pie Chart Display: Shows poll responses with color-coded sections
- Hover Information: Displays detailed data when hovering over sections
- Color Legend: Shows which colors correspond to which answers
- Real-time Updates: Automatically updates as students respond
Teachers can set server-side timers with sound notifications:
-
Start Timer: Set a duration through the UI or
/api/v1/class/{id}/timer/start - Sound Alerts: Optional audio notification when timer expires
- Visual Display: Timer state is included in live class updates
- Control: Start, pause, resume, end, and clear timers
The Control Panel provides comprehensive classroom management tools with four main sections:
Filter students based on various criteria:
- Poll Responses: Show only students who have/haven't responded
- Help Tickets: Filter by students with active help requests
- Break Requests: Show students currently on break
- Tags: Filter by specific student tags
Organize students by:
- Name: Alphabetical sorting
- Poll Responses: Sort by poll participation
- Help Time: Sort by when help was requested
- Permissions: Sort by user permission level
- Checkboxes: Select individual students for targeted polls
- Bulk Selection: Choose multiple students at once
Quick poll creation with presets:
- TUTD: Thumbs Up/Thumbs Down
- True/False: Binary choice polls
- Done/Ready: Completion status polls
- Multiple Choice: Custom multiple option polls
- Custom: Advanced poll creation
- Prompt: The question or instruction for students
- Answer Options: Create multiple choice responses
- Text Responses: Allow free-form text answers
- Multiple Responses: Permit multiple selections
- Blind Polls: Hide results from students
- Weight: Set point value for pog meter
- Tags: Restrict to students with specific tags
- Click "Custom" in Fast Poll section
- Enter poll prompt
- Set number of answer options
- Configure advanced options:
- Multiple answer selection
- Text response capability
- Blind poll mode
- Tag requirements
- Vote change permissions
Change student access through class roles:
- Teacher-like roles: Session, timer, student, and settings control
- Mod-like roles: Poll, help, break, tag, link, and sharing control
- Student-like roles: Standard poll/help/break participation
- Guest: Limited access until enrolled or promoted
- Banned/Blocked: Prevents class access
Organize students with custom tags:
- Click on a student in the control panel
- Click "Tags" button
- Select existing tags or create new ones
- Tags enable targeted polling and organization
- View Requests: See all help tickets in the control panel
- Response Information: View student's help request details
- Time Tracking: Monitor when tickets were submitted
- Resolution: Mark tickets as resolved
- Approve/Deny: Control student break requests
- Reason Tracking: View why students need breaks
- Time Management: Monitor break duration
- Status Updates: Real-time break status
When no poll is active, students see "No active poll" When polls are active, students see:
- Poll Question: Clear display of the current question
- Answer Options: Radio buttons for each choice
- Submit Button: Submit their response
- Confirmation: Pop-up confirming submission
Students can request help:
- Click "Help" button
- Enter optional reason for help needed
- Submit request
- Teacher receives notification in Control Panel
Students can request breaks:
- Click "Take Break" button
- Select break type:
- Bathroom: Default option
- Other: Custom break with reason
- Submit request
- Wait for teacher approval
- Real-time Updates: See poll results as they come in
- Response Confirmation: Get confirmation when vote is submitted
- Change Votes: Modify responses if allowed by teacher
- Multiple Selections: Choose multiple options if enabled
Digipogs are the digital currency system in Formbar.js, inspired by the classic pog game. Students earn digipogs through participation and can transfer them to other users.
- Poll Participation: Earn points for responding to polls
- Pog Meter: Accumulate points (500 points = 1-10 random digipogs)
- Teacher Awards: Direct digipog awards from teachers
- Weight System: Higher-weighted polls provide more points
- Point Accumulation: Each poll response adds 100 × weight points
- Meter Reset: Resets to 0 after earning digipogs
- Random Rewards: Earn 1-10 digipogs when meter reaches 500
- First Response Only: Only first response to each poll counts
- PIN Security: Requires recipient's PIN for transfers
- Tax System: 10% tax on all transfers (prevents inflation)
- Transaction Logging: Complete audit trail of all transfers
- Pool Transfers: Send digipogs to shared pools
Create shared pools for group activities:
- Pool Creation: Create up to 5 pools per user
- Member Management: Add/remove pool members
- Equal Distribution: Distribute pool funds equally among members
- Direct Transfers: Send digipogs directly to pools
- Save Polls: Create reusable poll templates
- Share Polls: Share polls between teachers and classes
- Public Polls: Make polls available to all users
- Poll History: View and reuse previous polls
Granular control over user capabilities:
- Class Permissions: Control what students can do in class
- Feature Access: Enable/disable specific features
- Role Management: Assign different permission levels
- Custom Permissions: Create custom permission sets
- Server-side Timers: Reliable countdown timers
- Sound Notifications: Audio alerts when timers expire
- Visual Display: Real-time countdown for all users
- Timer Control: Start, stop, and reset functionality
Organize and filter students:
- Custom Tags: Create class-specific tags
- Tag Filtering: Filter students by tags
- Targeted Polling: Create polls for specific tag groups
- Tag Management: Add, remove, and modify tags
- External Links: Add links to external resources
- Student Access: Students can access teacher-provided links
- Link Management: Add, edit, and remove plugin links
- Custom Integration: Connect to third-party tools
# Install dependencies
npm install
# Initialize database
npm run init-db
# Run migrations
npm run migrate
# Start development server
npm run dev
# Run tests
npm test
# Format code
npm run format-
Backend Environment Variables: Configure the backend
.envfile inFormbar.js. -
Frontend Environment Variables: Configure the frontend
.envfile inFormbar.ts-client. - Database Settings: SQLite database configuration is handled by the backend.
- Email Settings: Configure SMTP for notifications in the backend.
- OIDC Settings: Set up Google and/or Microsoft login providers in the backend (optional).
- IP Management: Configure whitelist/blacklist in the backend.
- Port Configuration: Set PORT environment variable
- Database Backup: Regular database backups recommended
- SSL Configuration: Configure HTTPS for production
- Logging: Winston-based logging system included
Formbar.js provides a comprehensive REST API for external integrations:
-
Versioned API: New routes live under
/api/v1 -
Swagger Docs: Open
/docson a running server for generated endpoint docs - User Management: Create, update, and manage users, roles, scopes, API keys, PINs, and notifications
- Class Operations: Join, leave, and manage classes, roles, links, tags, timers, help, and breaks
- Poll Management: Create, update, respond to, and read polls
- Digipog Operations: Transfer and award digipogs, plus pool management
Real-time communication through WebSocket connections:
- Live Updates: Real-time poll results and classroom updates
- Event Handling: Comprehensive event system for all features
- Permission-based: Secure access based on roles and scopes
The official frontend is maintained separately in Formbar.ts-client. It is a Vite/React/TypeScript app that talks to the backend with VITE_FORMBAR_API_URL and connects to Socket.IO with bearer tokens.
- WebSocket API: See the WebSocket API page for socket events and examples
-
HTTP API: See the HTTP API page for REST examples and
/docsfor generated endpoint details - Digipog System: See the Digipogs page for currency system details
-
Database Errors: Ensure database is initialized with
npm run init-db - Permission Issues: Check user permissions and class settings
- Connection Problems: Verify network connectivity and server status
- Poll Issues: Check poll configuration and student permissions
- GitHub Issues: Report bugs and request features
- Documentation: Comprehensive API and feature documentation
- Community: Join the Formbar.js community for support
This project is licensed under the YCSTEL-1.0 License. See the LICENSE file for details.
For technical implementation details, API documentation, and advanced configuration options, refer to the specialized documentation files included with Formbar.js.