{"id":22088417,"url":"https://github.com/ayazhankadessova/python-bit","last_synced_at":"2026-03-05T06:02:06.521Z","repository":{"id":265646781,"uuid":"859059756","full_name":"ayazhankadessova/python-bit","owner":"ayazhankadessova","description":"Teach Kids Python in a collaborative environment with ready curriculum!","archived":false,"fork":false,"pushed_at":"2025-04-20T10:22:35.000Z","size":54061,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T23:31:55.508Z","etag":null,"topics":["firebase","nextjs","python"],"latest_commit_sha":null,"homepage":"https://www.pythonbit.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ayazhankadessova.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-18T02:29:34.000Z","updated_at":"2025-09-29T14:44:24.000Z","dependencies_parsed_at":"2025-01-01T10:19:12.650Z","dependency_job_id":"b4bac3b4-86d2-42ea-94b8-42be832f46ec","html_url":"https://github.com/ayazhankadessova/python-bit","commit_stats":null,"previous_names":["ayazhankadessova/python-bit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ayazhankadessova/python-bit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayazhankadessova%2Fpython-bit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayazhankadessova%2Fpython-bit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayazhankadessova%2Fpython-bit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayazhankadessova%2Fpython-bit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayazhankadessova","download_url":"https://codeload.github.com/ayazhankadessova/python-bit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayazhankadessova%2Fpython-bit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30111779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase","nextjs","python"],"created_at":"2024-12-01T02:08:21.734Z","updated_at":"2026-03-05T06:02:06.495Z","avatar_url":"https://github.com/ayazhankadessova.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PythonBit: Interactive Python Learning Platform with micro:bit\n\nA real-time interactive coding platform that bridges block-based programming to text with Python and micro:bit, designed for students in grades 5-7.\n\n## 🌟 Features\n\n- **Real-time Collaboration**\n\n  - Live code sharing between teachers and students\n  - Real-time code execution and feedback\n  - Virtual classroom environment\n\n- **Curriculum Management**\n\n  - Structured weekly learning modules\n  - Progressive difficulty levels\n  - Integrated micro:bit activities\n\n- **Interactive Learning**\n\n  - Code editor with syntax highlighting\n  - Real-time test case validation\n  - AI-assisted learning support\n\n- **Progress Tracking**\n  - Student progress monitoring\n  - Task completion tracking\n  - Weekly performance analytics\n\n## Credits \n\n- Python Tutorial Modified from: \n  * https://www.learnpython.org/en/Welcome \n  * https://www.geeksforgeeks.org/python-for-kids/#control\n\n## 🛠 Tech Stack\n\n- **Frontend**: Next.js 14, React\n- **UI Components**: shadcn/ui\n- **State Management**: Context API\n- **Backend**: Firebase\n  - Authentication\n  - Firestore Database\n  - Real-time updates\n- **Real-time Communication**: Socket.IO\n- **Code Editor**: CodeMirror\n- **Styling**: TailwindCSS\n\n## 🏗 Architecture\n\n### Database Structure (Firestore)\n\n```\n├── users/\n│   └── userId/\n│       ├── displayName\n│       ├── email\n│       ├── role\n│       └── solvedProblems[]\n│\n├── classrooms/\n│   └── classroomId/\n│       ├── teacherId\n│       ├── name\n│       ├── curriculumId\n│       ├── activeSession\n│       └── lastTaughtWeek\n│\n├── curricula/\n│   └── curriculumId/\n│       └── weeks[]/\n│           ├── weekNumber\n│           └── assignmentIds[]\n│\n└── weeklyProgress/\n    └── ${classroomId}-${weekNumber}/\n        ├── activeSession\n        ├── lastUpdated\n        └── taskCompletions/\n            └── taskId/\n                └── completedBy[]\n```\n\n### Real-time Features\n\n- Socket.IO events handling:\n  - Join/leave classroom sessions\n  - Code sharing and updates\n  - Task completion notifications\n  - Student progress updates\n\n## 🚀 Getting Started\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/yourusername/python-bit.git\ncd python-bit\n```\n\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n3. Set up environment variables:\n\n```env\nNEXT_PUBLIC_FIREBASE_API_KEY=\nNEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=\nNEXT_PUBLIC_FIREBASE_PROJECT_ID=\nNEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=\nNEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=\nNEXT_PUBLIC_FIREBASE_APP_ID=\nNEXT_PUBLIC_BASE_URL=\n```\n\n4. Run the development server:\n\n```bash\nnpm run dev\n```\n\n## 📱 Components\n\n### Core Components\n\n- `TeacherSessionView`: Manages the teacher's view of the virtual classroom\n- `StudentSessionView`: Handles the student's learning interface\n- `WeekSelector`: Controls curriculum week navigation\n- `FileProcessorTest`: Manages code execution and testing\n\n### Authentication\n\n- Context-based authentication system\n- Role-based access control\n- Protected routes and sessions\n\n## 🔄 Current Development Status\n\n### Completed Features\n\n- [x] User authentication system\n- [x] Real-time code sharing\n- [x] Basic curriculum structure\n- [x] Task completion tracking\n- [x] Live session management\n\n### In Progress\n\n- [ ] AI assistance integration\n- [ ] Enhanced test case management\n- [ ] micro:bit hardware integration\n- [ ] Extended curriculum content\n\n## 🌐 Future Enhancements\n\n1. **Performance Optimization**\n\n   - Implement caching mechanisms\n   - Optimize database queries\n   - Reduce unnecessary API calls\n\n2. **Feature Additions**\n\n   - Advanced AI code assistance\n   - Extended micro:bit integration\n   - Enhanced progress visualization\n   - Comprehensive test suite\n\n3. **UI/UX Improvements**\n   - Responsive design enhancements\n   - Accessibility improvements\n   - Dark/light theme toggle\n\n## 🤝 Contributing\n\nContributions are welcome! Submit a pull request.\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template\u0026filter=next.js\u0026utm_source=create-next-app\u0026utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nCheck out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.\n\n# Development Log\n\n## Project Timeline\n\n### Phase 1: Initial Setup \u0026 Core Features (Sep 18-23)\n\n- ✅ Implemented shadcn/ui components\n- ✅ Created basic teacher/student pages\n- ✅ Set up MongoDB database structure\n- ✅ Implemented classroom session functionality\n- ✅ Added real-time code sharing features\n- ✅ Developed user management system\n\n### Phase 2: Socket Integration \u0026 Real-time Features (Oct 18-21)\n\n- ✅ Implemented code execution functionality\n- ✅ Added progress tracking\n- ✅ Enhanced session management\n- ✅ Developed weekly task system\n- ✅ Implemented student progress monitoring\n\n### Phase 3: Firebase Migration \u0026 Enhancement (Nov 22-30)\n\n- ✅ Migrated to Firebase\n- ✅ Implemented AuthContext\n- ✅ Created curriculum structure\n- ✅ Enhanced classroom management\n- ✅ Improved student dashboard\n- ✅ Implemented real-time updates\n\n## Technical Implementation Details\n\n### Socket.IO Event Structure\n\n```javascript\n// Core Events\n1. join-room\n2. leave-room\n3. code-update\n4. send-code-to-student\n5. send-code-to-all\n6. get-student-code\n```\n\n## Ongoing Development\n\n### High Priority\n\n- [ ] API Route Consolidation\n- [ ] Caching Implementation\n- [ ] Test Case Management\n- [ ] Progress Tracking Enhancement\n\n### Medium Priority\n\n- [ ] AI Integration\n- [ ] micro:bit Connection\n- [ ] UI/UX Improvements\n- [ ] Extended Curriculum Development\n\n### Performance Optimizations\n\n- Implement caching for classroom/curriculum data in individual classrooms\n- Consolidate API calls\n- Add error boundaries\n- Revamp everything to SWR/SWR Mutation implementation\n\n## Learning Curriculum Structure\n\n### Week 3-4\n\n- Lists and Loops\n- Basic Data Processing\n- Dictionaries\n- File Handling\n\n### Week 5-6\n\n- Advanced Functions\n- Error Handling\n- Simple Classes\n- Final Project\n\n## Future Enhancements\n\n### Technical Improvements\n\n- Queuing system for code execution\n- File persistence system\n- Library optimization\n- Enhanced test case system\n\n### Infrastructure\n\n- API route consolidation\n- Caching implementation\n- Error handling improvement\n- Performance optimization\n\n### Educational Features\n\n- Interactive problem sets\n- Custom test case creation\n- Progress visualization\n- Peer review system\n\n## Nov 30\n\n### Easy\n\n- [ ] ALL firebase operations under `/api`\n- [x] Dashboard cache\n- [x] Classrooms page cache\n- [ ] Add caching for the individual classroom pages\n- [ ] Explore page is just list of all problems\n- [ ] lesson progress card -\u003e firestore\n- [ ] Add favicon for my app\n- [x] no need to store both username and code of students , just store the usernames\n- [x] Teacher dashboard \u0026 student dashboard -\u003e many overlap\n- [x] Student classrooms \u0026 teacher classrooms -\u003e many overlap\n\n### Medium\n\n- [ ] Work on Week 5\n- [ ] dont refresh code card after the test casses are passed\n- [ ] Show which test cases are we running -\u003e students can choose which test cases they want to run\n- [ ] Make progress bar better\n- [ ] fix topics\n- [ ] UseAuth must be used within AuthProvider after login\n\n## 25 dec\n\n- [x] MDX w/ velite\n- [x] Add full python course mdx\n- [x] l1\n- [x] l2\n- [x] l3\n- [x] back button\n- [x] Share button\n\n## Dec 26 \n\n- [x] Header fix \n- [x] Footer fix\n- [x] Added tags to python101 lessons\n\n## Dec 27\n\n- [x] Search btn \n- [x] Active tab \n- [x] Logo diff \n- [x] Exercise 1 in projects\n\n## Dec 28\n- [x] exercise type to types file\n- [x] project images added\n- [x] fix \"Go to Theme ad card\" end\n- [x] themes moved to config\n- [x] Run / Submit Btns \n\n## Dec 29: \n\n- Work on `Tutorials` page till 4pm \n- [ ] Students need to run ever cell to complete exercise, so think of a logic\n\n## Backend\n- [x] rate Limiter \n- [ ] add caching to all routes\n- [ ] add error handling to all routes\n- [ ] add validation to all routes\n\n## Front \n- [ ] Students need to run ever cell to complete exercise, so think of a logic\n- [x] handle Exercises completion check\n- [x] add footer icons\n- [x] siteConfig fix!\n- [x] bg gradient\n- [x] resize python code editor\n- [x] add home page\n- [x] remove underline in tailwind md\n- [x] accent to curr tab if togglable , accent to pages when I am in sub pages\n\n\n## Jan 1\n\n- [ ] padding to project page \n- [x] add at least 4 projects\n- [ ] if solved project, add to firestore\n- [ ] store code  ?? \n- [ ] add share if completed project\n- [ ] add caching to progress checkers\n- [ ] next tutorial Button\n- [ ] Add 5 projects w/ tags\n- [x] Add better imgs\n- [ ] Meme creation tools\n\n# Jan 2\n\n- [ ] show if error when running\n- [x] should backend return {err \u0026 output} or {err, success, output}\n- [x] tut 4 and rest\n- [ ] projects to config\n- [ ] store expected output in config file, not in .md.\n- [ ] added aura points , can see in frontend. add testCode to backend\n- [x] handleProjectCompletion\n- [x] show that project is completed\n- [ ] do we even need config for the exercises? technically, if i dont want to pass starter code, but then i have to have it in json?\n\n## jan 4\n- [x] add back btn to theme\n- [x] Project status \n- [x] project status to theme\n- [ ] last attemp to date -\u003e format date is util\n- [x] move utils/projects to lib\n\n## Jan 5\n\n- [x] add Reset code button to codeExecutor\n- [x] handleExercise run\n- [x] lastUpdated not shown if no progress at all\n- [x] add overall Progress thing to tutorial\n- [x] add last Activity\n- [ ] keep all interfaces in 1 place\n- [ ] add attempts. show attempts\n\n## Jan 6\n- [ ] show attempts for project\n- [ ] add one more project\n- [ ] `api/tutorial/[tid]` -\u003e get info on tutorial progress. cache it and only refresh if hanld exercise completing\n- [ ] const { progress, invalidateCache } = useProjectProgress(projectId, user)\n- [ ] add latest attempt to project\n\n// When submitting code:\nawait submitCode(...)\ninvalidateCache() // This will drop the cache and trigger a refetch\n\n## Jan 9 \n\n- [x] run code and show output \n- [x] no test code but rather expected output !!\n- [x] make reusable component for code editor in live session\n\n## Jan 10\n- [x] add three themes to live session code editor\n- [x] update code\n- [x] reset code\n- [ ] fix when disabled\n- [x] add reset code to live session code editor\n- [x] Fix the assignent in firebase\n- [x] fix its json\n- [x] join leave session\n\n## Jan 12\n\n- [x] ui for management of classrooms\n- [x] backticks ui\n- [x] depreciate test code for assignments\n- [ ] security for firestore stuff\n- [x] join session then u should pre select week task\n- [x] del active session from classroom interface\n\n\n## Jan 13\n\n- [x] del session\n- [ ]  add more weeks\n- [ ]  think of sys des for handle complete assignment\n- [ ] show solution to teachers\n- [ ] add students when they connect \n- [x] deploy to vercel\n- [x] remove selectedStudent\n- [ ] have to upd the code before sending?\n- [ ] \n- [ ] get project progress information\n- [ ] add like uncomment this code \n\n\n- add caching to all firestore opers\n\n- Avatar circles (students) https://magicui.design/docs/components/avatar-circles\n- confetti https://magicui.design/docs/components/confetti\n- particles\n- cool mode for btns https://magicui.design/docs/components/cool-mode\n## jan 11 \n\n- [ ] implement magic js somehwee\n\n## Feb 12\n\n- Global search: tutorials, pages, \n- [x] Search projecs\n\n## Feb 13\n- [x] Make Run Code and Submit Btns different\n- [x] light+Dark mode header btns remove bg\n- [x] hydration issues solved\n- [x] create week 2 assignments \n- [x] create week 3 assignments\n- [ ] Check project types: eg there is one from velite and one that i created\n- [x] beautiful 404\n- [ ] what stuff should be in velite projects?\n- [x] create week 3 assignments\n  \n## Feb 14\n\n- [x] create week 4 assignments\n- [x] When creating curricula, make sure assignment is added\n- [x] Fix week selector!, make sure assignments properly shown\n- [x] remove useless stuff from currcilim. which fields u dont need?\n- [x] Add 5 weeks to curricula\n\n\n## Feb 15 \n\n- [x] how does lastTaught week get updated?\n- [ ] lessonprogresscard\n- [ ] why students: 0 ?\n- [ ] add solved Assignments\n- [ ] Remove headers from assignments\n- [ ] list of schools in HK\n- [ ] lesson progress -\u003e just show if student has this assignment as completed assignment \n- [x] fetch classrooms doesnt get updated\n\n\n## Feb 17\n\n- [ ] fetchClassroomAndCurriculum twice -\u003e hooks\n\n## Later\n\n- [ ] get assignment expectedOutput from firestore [fastapi]\n- [ ] Should I show progress for assignment ?\n\n## Feb 16 \n\n- [ ] create new pics for tutorials\n- [ ] what do i need when i create a classroom ?\n- [ ] Should i add dashboard page?\n\n## Feb 18\n\n- [x] school list Show\n- https://en.wikipedia.org/wiki/List_of_secondary_schools_in_Hong_Kong\n- [x] login error show. \n- [x] why do we need id in useClassrooms\n- [x] API Error: Dynamic server usage: Route /api/classrooms couldn't be rendered statically because it used `request.url`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error\n- [ ] classrooms not updated!  \n- [x] tutorials: show where to press on tutorial (underline). \n- [x] exercises not found. dark theme remove. back not working. \n- [ ] not started should not be there if there is last Attempt. \n- [x] add images to projects. \n- [x] indexof TypeError: undefined is not an object (evaluating 'n.indexOf') assignmentProgress\n\n## Feb 20\n\n- [ ] how to see focused or not \n- [x] delete old problems\n- [ ] make limits to writes\n- [ ] next tutorial button.\n- [ ] add tooltip to theme btns\n\n## Feb 24\n\n- [ ] lesson 7\n\n## Feb 25\n- [ ] allow users to change settings\n\n\n## Project Test cases\n\n- [ ] Add test cases to 2-3 projects\nModern Features to Include:\nAchievements/badges system\nSocial sharing options\nProject showcases\nPeer reviews\nAI-powered hints\nReal-time collaboration\nCustomizable themes/avatars\n\nfor every classroom, teachers will want to see progress\nwe will leyt them choose classroom and show\n\nlesson \n\nlist of students and their progress\nfor every student -\u003e go to their \"tutorials progress\" -\u003e set of completed exercises\nwe will see the total progress by \ntutrials data or every tutorials\n- is logged in ? exerices number, tutorial_id \n- execute code , is_exercise if yes then upd in firestore\n- show is completed for ever lesson\n- progress for every lesson\n- what to store on firestore (lesson id , total exercises count)\n- for user, create progress_tut collection and store their tut progress\n- [ ] How can i track completion? For every classroom, show list of lessons and how many completed. Completed = Did exercise\n- [ ] Classes\n- [ ] For teacher, add panel to monitor each classroom\n\n## BackLog\n- [x] GitHub, Logo icons\n- [ ] In Live Session, Markdown rendered renders backticks and ``` in a weird way. Figure out how rehype pretty code is messing is in conflict\n- [ ] Dont send expectedOutput and testCases, they should be in Backend\n- [ ] Search Button Functionality\n- [ ] logo\n- [ ] Add quiz custom elements\n- [ ] fix page paddings \u0026 nav font bigger\n- [ ] Pagination in Tutorials page should be more sophisticated (per page), show page numbers\n- [ ] Background -\u003e picture not just white/dark.\n- [ ] Fix session view ui, make it more engaging for kids (Raise hand needed?)\n- [ ] Add PythonCodeEditor integration to Lessons4-...\n- [ ] why is my ```code theme not githubdark\n- [ ] Clean up types\n\n## What I have\n- go thru every week and check what works and what not \n- Student create their own accounts -\u003e no need\n\n## What I need \n- markdown based sessions for every week.\n- make them and just add them to firebase\n- students can either see them or what their teacher chose\n- Create a template where teachers can create their own courses \n- Self paced learning -\u003e add problems there \n- Teachers create students' accounts\n- Every student has managed_by field \n- Easier \n- Detect if students are active\nimport { useAuth } from '@/contexts/AuthContext'\n\n  const { user, loading, signOut } = useAuth()\n\n\n\n## Pages \n\n1. `container mx-auto px-8 py-8`\n2. add toc to tutorials\nOutput does not match expected result\n\n\n## projects \n\n```\nusers/\n  {uid}/\n    projects/\n      {project_id}/\n        completed: boolean\n        lastAttempt: number\n        totalAttempts: number\n        successfulAttempts: number\n        attempts/\n          {auto-id}/  // Automatically generated ID\n            code: string\n            timestamp: number\n            success: boolean\n```\n\n\n## Color Palette\n1. #D7F4EE\n2.  #E0D7F4\n2. #F4D7DD\n3. #EBF4D7\n\n\nimages, change questions.\n\n\n- Bugs:\nquiz 5, q6: options should be code blocks\n\n- add more quizzes\n- interactivity\n\n## layout fixes\n\n\n\u003c!-- -     \u003cdiv className='container max-w-6xl mx-auto px-8 md:px-14 py-16'\u003e --\u003e\n\nSo, i want my pages to take up whole width , unless i specify smth diff,\nnow need to think on padding\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayazhankadessova%2Fpython-bit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayazhankadessova%2Fpython-bit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayazhankadessova%2Fpython-bit/lists"}