Skip to content

Latest commit

 

History

History
100 lines (66 loc) · 4.51 KB

File metadata and controls

100 lines (66 loc) · 4.51 KB

Python Learning Path Application Guide

Overview

This is a Streamlit-based web application designed to help users learn Python programming from beginner to advanced levels. The app provides a structured learning path with curated resources, projects, progress tracking, and a community discussion feature. It's designed as a self-contained learning platform that guides users through their Python learning journey.

User Preferences

Preferred communication style: Simple, everyday language.

System Architecture

The application follows a simple monolithic architecture built with Streamlit. Key architectural decisions include:

  1. Streamlit for UI/Frontend: The application uses Streamlit as both the frontend and backend framework, which simplifies development by allowing Python code to generate interactive web interfaces without needing separate frontend technologies.

  2. File-based Storage: Data is stored in JSON files rather than a database. This approach was chosen for simplicity and portability, though it limits scalability for large user bases.

  3. Page-based Navigation: The application uses Streamlit's multi-page app structure (via the pages/ directory) to organize different sections of the learning platform.

  4. Session-based User Management: User state is managed using Streamlit's session state functionality rather than a formal authentication system.

Key Components

Core Components

  1. Main Application (app.py):

    • Entry point for the application
    • Handles user login/registration
    • Provides basic navigation
  2. Utility Module (utils.py):

    • Contains shared functions for data loading/saving
    • Manages resource and project data
    • Handles user progress tracking
  3. Page Modules (in the pages/ directory):

    • beginner.py, intermediate.py, advanced.py: Resource pages for different skill levels
    • projects.py: Project suggestions for hands-on learning
    • progress.py: User progress tracking and visualization
    • community.py: Discussion forum for users

Data Storage

Data is stored in JSON files in the data/ directory:

  • resources.json: Curated learning resources categorized by skill level
  • projects.json: Practice projects with descriptions and starter code
  • user_progress.json: Tracks individual user progress
  • discussions.json: Community discussions (created at runtime if not present)

Data Flow

  1. User Authentication Flow:

    • User enters username on the main page
    • System either creates a new user profile or loads existing data
    • User session is maintained via Streamlit's session state
  2. Learning Resource Flow:

    • Resources are loaded from JSON files
    • Users can filter and browse resources by type or other attributes
    • Completed resources are tracked in the user's progress data
  3. Progress Tracking Flow:

    • User interactions with resources/projects are recorded
    • Progress visualizations are generated based on completion data
    • Level advancement is suggested based on completion percentage

External Dependencies

The application relies on the following key external libraries:

  1. Streamlit: Core framework for the web interface
  2. Matplotlib: Used for generating progress visualizations
  3. Pandas: Data manipulation for resources and progress tracking

Deployment Strategy

The application is configured for deployment on Replit with:

  1. Streamlit Server: The main application is served via Streamlit on port 5000
  2. Python 3.11: The application targets Python 3.11 runtime
  3. Autoscaling: The deployment target is set to "autoscale" in the Replit configuration
  4. Required Packages: Dependencies are specified in pyproject.toml

Development Workflow

The repository is set up with a streamlined workflow:

  1. The "Project" workflow runs in parallel mode
  2. The "Streamlit Server" task launches the application on port 5000
  3. The server is configured to run in headless mode

Future Enhancements

  1. Database Integration: Consider replacing file-based storage with a proper database (SQLite, PostgreSQL with Drizzle) for better scalability and concurrent user support.

  2. Authentication System: Implement a more robust authentication system rather than simple username-based login.

  3. Content Expansion: Add more resources, projects, and learning paths for specialized Python domains (data science, web development, etc.).

  4. Interactive Coding Challenges: Integrate a Python code execution environment to allow users to practice directly in the application.