Skip to content

Prismo is a modern educational platform built with Angular and Flask, featuring interactive coding labs, AI-powered module generation, and a widget-based learning system. It combines real-time code execution, gamified learning, and detailed analytics to make programming education more engaging and personalized.

Notifications You must be signed in to change notification settings

HappyCoderHackathons/prismo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

232 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Prismo

A modern educational platform built with Angular and Flask, featuring interactive coding labs, widget-based learning modules, and gamification elements. Prismo provides an engaging environment for learning programming concepts with real-time code execution and feedback.

๐Ÿš€ Features

  • Interactive Coding Labs - Hands-on coding exercises with real-time feedback
  • Widget System - Modular, reusable educational components
  • Module Generator - AI-powered learning module creation
  • Code Execution Engine - Support for Python, JavaScript, Java, and more
  • Gamification - Achievement system to track learning progress
  • Analytics Dashboard - Track learning metrics and progress
  • OAuth Integration - Secure authentication with AWS Cognito
  • Server-Side Rendering - Optimized performance with Angular SSR
  • Modern UI - Built with Tailwind CSS and Angular CDK

๐Ÿ“‹ Prerequisites

  • Node.js (v18 or higher)
  • Python (3.14 or higher)
  • Angular CLI (20.3.5)
  • AWS Account (for Cognito and DynamoDB)
  • uv (Python package manager)

๐Ÿ› ๏ธ Installation

Frontend Setup

  1. Install dependencies:

    npm install
  2. Configure environment: Create environment files in src/environments/:

    • environment.ts (development)
    • environment.prod.ts (production)
  3. Start development server:

    npm start
    # or
    ng serve
  4. Access the application: Navigate to http://localhost:4200/

Backend Setup

  1. Navigate to backend directory:

    cd backend
  2. Install Python dependencies:

    uv sync
  3. Configure AWS services:

    • Set up AWS Cognito User Pool
    • Configure DynamoDB tables
    • Set environment variables

    See backend/OAUTH_SETUP.md for detailed AWS configuration.

  4. Initialize database tables:

    python setup_tables.py
  5. Start the backend server:

    python main.py

    The API will be available at http://localhost:5000

๐Ÿ“ Project Structure

prismo/
โ”œโ”€โ”€ src/                          # Angular frontend
โ”‚   โ”œโ”€โ”€ app/                      # Application modules
โ”‚   โ”‚   โ”œโ”€โ”€ auth/                 # Authentication components
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard/            # Dashboard views
โ”‚   โ”‚   โ”œโ”€โ”€ labs/                 # Coding labs
โ”‚   โ”‚   โ”œโ”€โ”€ widget-lab/           # Widget laboratory
โ”‚   โ”‚   โ””โ”€โ”€ components/           # Reusable components
โ”‚   โ”œโ”€โ”€ components/               # UI components
โ”‚   โ”‚   โ”œโ”€โ”€ ui/                   # Base UI components
โ”‚   โ”‚   โ”œโ”€โ”€ labs/                 # Lab-specific components
โ”‚   โ”‚   โ”œโ”€โ”€ widgets/              # Widget components
โ”‚   โ”‚   โ””โ”€โ”€ modules/              # Module components
โ”‚   โ”œโ”€โ”€ services/                 # Angular services
โ”‚   โ”œโ”€โ”€ guards/                   # Route guards
โ”‚   โ”œโ”€โ”€ interceptors/             # HTTP interceptors
โ”‚   โ””โ”€โ”€ types/                    # TypeScript type definitions
โ”œโ”€โ”€ backend/                      # Flask backend
โ”‚   โ”œโ”€โ”€ app/                      # Application core
โ”‚   โ”‚   โ”œโ”€โ”€ routes.py             # API routes
โ”‚   โ”‚   โ”œโ”€โ”€ auth_routes.py        # Authentication endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ learning_routes.py   # Learning module endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ module_generator_routes.py  # AI module generation
โ”‚   โ”‚   โ”œโ”€โ”€ gamification_routes.py      # Achievement system
โ”‚   โ”‚   โ”œโ”€โ”€ analytics_routes.py  # Analytics endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ models.py             # Data models
โ”‚   โ”‚   โ”œโ”€โ”€ orm.py                # DynamoDB ORM
โ”‚   โ”‚   โ””โ”€โ”€ ace_engine.py         # Code execution engine
โ”‚   โ”œโ”€โ”€ config.py                 # Configuration
โ”‚   โ””โ”€โ”€ main.py                   # Application entry point
โ”œโ”€โ”€ public/                       # Static assets
โ””โ”€โ”€ angular.json                  # Angular configuration

๐Ÿ”ง Available Scripts

Frontend

  • npm start - Start development server
  • npm run build - Build for production
  • npm run watch - Build in watch mode
  • npm test - Run unit tests
  • npm run serve:ssr:prismo - Serve SSR build

Backend

  • python main.py - Start Flask server
  • python setup_tables.py - Initialize DynamoDB tables
  • python test_code_execution.py - Test code execution engine
  • python test_java_execution.py - Test Java support
  • python test_module_generator.py - Test module generation

๐Ÿ” Environment Variables

Frontend (src/environments/environment.ts)

export const environment = {
  production: false,
  apiUrl: 'http://localhost:5000',
  cognitoUserPoolId: 'your-user-pool-id',
  cognitoClientId: 'your-client-id',
  awsRegion: 'us-east-1'
};

Backend

Create a .env file in the backend/ directory:

AWS_REGION=us-east-1
COGNITO_USER_POOL_ID=your-user-pool-id
COGNITO_CLIENT_ID=your-client-id
DYNAMODB_TABLE_PREFIX=prismo
FLASK_ENV=development

๐Ÿงช Testing

Frontend Tests

ng test

Backend Tests

cd backend
python -m pytest

๐Ÿ—๏ธ Building for Production

Frontend

ng build --configuration production

Build artifacts will be stored in the dist/ directory.

Backend

The Flask application can be deployed using various methods:

  • AWS Elastic Beanstalk
  • Docker containers
  • Traditional WSGI servers (Gunicorn, uWSGI)

๐Ÿ“š Key Technologies

Frontend

  • Angular 20 - Modern web framework
  • TypeScript - Type-safe JavaScript
  • Tailwind CSS - Utility-first CSS framework
  • CodeMirror - Code editor component
  • KaTeX - Math rendering
  • Marked - Markdown parsing
  • GSAP - Animation library

Backend

  • Flask - Python web framework
  • AWS Cognito - Authentication service
  • DynamoDB - NoSQL database
  • boto3 - AWS SDK for Python
  • JWT - Token-based authentication
  • Anthropic Claude API - AI-powered features

๐ŸŽฎ Features Guide

Labs

Interactive coding exercises with multiple programming language support. Each lab includes:

  • Problem description with rendered markdown
  • Code editor with syntax highlighting
  • Test cases for validation
  • Real-time feedback

Widgets

Reusable learning components that can be embedded in various contexts:

  • Interactive demonstrations
  • Visual explanations
  • Practice exercises
  • Mini-projects

Module Generator

AI-powered tool to create custom learning modules:

  • Natural language input
  • Automatic content generation
  • Structured curriculum creation
  • Customizable difficulty levels

Analytics

Track learning progress with detailed metrics:

  • Time spent on labs
  • Completion rates
  • Skill progression
  • Achievement tracking

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is private and proprietary.

๐Ÿ“ž Support

For questions or issues, please open an issue in the repository.

๐Ÿ”— Additional Documentation


Built with โค๏ธ for education

About

Prismo is a modern educational platform built with Angular and Flask, featuring interactive coding labs, AI-powered module generation, and a widget-based learning system. It combines real-time code execution, gamified learning, and detailed analytics to make programming education more engaging and personalized.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •