Deploying Schoco
Introduction
Schoco (School Coding) is an open-source web-based programming environment designed for educational settings. It provides students with a browser-based integrated development environment (IDE) that requires no local installation, making it ideal for classroom use and remote learning.
The platform supports multiple programming languages and provides a sandboxed execution environment for safely running student code. Teachers can manage classrooms, distribute assignments, and monitor student progress through an intuitive interface.
Key highlights of Schoco:
- Browser-Based IDE: No installation required for students
- Multi-Language Support: Java, Python, and more
- Classroom Management: Teacher and student roles
- Assignment System: Create and distribute coding exercises
- Code Execution: Safe, sandboxed environment
- Syntax Highlighting: Modern code editor
- Auto-Save: Preserve student work
- Progress Tracking: Monitor student submissions
- Collaborative Features: Share and discuss code
- Responsive Design: Works on tablets and laptops
This guide walks through deploying Schoco on Klutch.sh using Docker, configuring the educational environment, and managing classrooms.
Why Deploy Schoco on Klutch.sh
Deploying Schoco on Klutch.sh provides several advantages for education:
Simplified Deployment: Klutch.sh builds your Schoco configuration automatically.
Persistent Storage: Attach volumes for student work and assignments.
HTTPS by Default: Secure access for students and teachers.
Scalable Resources: Handle classroom peaks during class time.
GitHub Integration: Version control your configuration.
Always-On Access: 24/7 availability for homework and practice.
Prerequisites
Before deploying Schoco on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository
- Basic familiarity with Docker
- MySQL or PostgreSQL database
- (Optional) A custom domain for your Schoco instance
Deploying Schoco on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 8080
Create Your Repository
Create a new GitHub repository for your deployment. Add a Dockerfile:
FROM eclipse-temurin:17-jdk
RUN apt-get update && apt-get install -y \ python3 \ python3-pip \ nodejs \ npm \ && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY schoco.jar /app/COPY application.properties /app/
ENV JAVA_OPTS="-Xmx512m"ENV SERVER_PORT=8080
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD curl -f http://localhost:8080/actuator/health || exit 1
CMD ["java", "-jar", "schoco.jar"]Create Configuration
Add application.properties:
server.port=8080spring.datasource.url=jdbc:mysql://mysql:3306/schocospring.datasource.username=schocospring.datasource.password=${DB_PASSWORD}
schoco.execution.timeout=30000schoco.execution.memory-limit=256mPush to GitHub
Commit and push your files.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project.
Create a New App
Connect your GitHub repository.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Configure settings:
| Variable | Value |
|---|---|
DB_PASSWORD | Database password |
ADMIN_EMAIL | Administrator email |
Attach Persistent Volumes
Add volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/app/data | 20 GB | Student work and files |
/app/submissions | 50 GB | Code submissions |
Deploy Your Application
Click Deploy to build.
Create Admin Account
Access deployment and create initial admin.
Initial Configuration
Admin Setup
Configure Schoco as administrator:
- Log in with admin credentials
- Configure system settings
- Set up language support
- Configure execution limits
Language Configuration
Enable programming languages:
| Language | Runtime | Use Case |
|---|---|---|
| Java | JDK 17 | Object-oriented programming |
| Python | Python 3 | Scripting and data science |
| JavaScript | Node.js | Web development |
Classroom Management
Creating Classrooms
Set up classroom environments:
- Navigate to Classrooms
- Create new classroom
- Set name and description
- Generate enrollment code
Student Enrollment
Add students to classrooms:
- Share enrollment code
- Students self-register
- Approve pending requests
- Assign to groups
Teacher Roles
Manage instructor access:
| Role | Capabilities |
|---|---|
| Admin | Full system access |
| Teacher | Manage own classrooms |
| Assistant | Limited editing rights |
Assignment System
Creating Assignments
Design coding exercises:
- Navigate to Assignments
- Create new assignment
- Write problem description
- Add starter code
- Set deadline
Test Cases
Automatic code validation:
// Test case configuration@Testpublic void testAddition() { assertEquals(5, Calculator.add(2, 3));}Grading Options
Configure evaluation:
- Automatic testing
- Manual review
- Partial credit
- Late submission policies
Code Editor
Editor Features
Browser-based IDE provides:
- Syntax highlighting
- Auto-completion
- Error detection
- Code formatting
- Line numbers
Execution Environment
Run code safely:
- Sandboxed execution
- Resource limits
- Timeout protection
- Output capture
Console Output
View results:
- Standard output
- Error messages
- Execution time
- Memory usage
Student Experience
Dashboard
Students see:
- Active assignments
- Submission status
- Grades and feedback
- Upcoming deadlines
Working on Assignments
Student workflow:
- Select assignment
- View instructions
- Write code in editor
- Run and test
- Submit solution
Receiving Feedback
Access results:
- Test case results
- Teacher comments
- Grade breakdown
- Improvement suggestions
Progress Tracking
Teacher Dashboard
Monitor students:
- Submission statistics
- Completion rates
- Common errors
- Time spent
Reports
Generate analytics:
- Class performance
- Individual progress
- Assignment difficulty
- Learning outcomes
Security
Code Sandboxing
Protect the system:
- Isolated execution
- No file system access
- Network restrictions
- Resource limits
User Authentication
Secure access:
- Password requirements
- Session management
- Role-based access
Customization
Branding
Customize appearance:
- School logo
- Color scheme
- Custom messages
Templates
Create assignment templates:
- Problem structures
- Code starters
- Test frameworks
Troubleshooting
Execution Failures
- Check timeout settings
- Verify language support
- Review error messages
- Check resource limits
Login Issues
- Reset passwords
- Verify user accounts
- Check email delivery
Performance
- Monitor resource usage
- Scale for classroom size
- Optimize database
Best Practices
Assignment Design
- Clear instructions
- Appropriate difficulty
- Multiple test cases
- Helpful error messages
Classroom Management
- Regular backups
- Monitor submissions
- Provide timely feedback
- Encourage practice
Additional Resources
Conclusion
Deploying Schoco on Klutch.sh provides a modern, browser-based programming environment for educational settings. With classroom management, assignment systems, and safe code execution, Schoco enables effective programming education without the complexity of local installations. Combined with Klutch.sh’s reliable hosting, you get an always-available learning platform for your students.