├── backend ├── __init__.py ├── app │ ├── __init__.py │ ├── api │ │ ├── __init__.py │ │ ├── endpoints │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── auth.cpython-312.pyc │ │ │ │ ├── chat.cpython-312.pyc │ │ │ │ ├── admin.cpython-312.pyc │ │ │ │ ├── judge.cpython-312.pyc │ │ │ │ ├── teams.cpython-312.pyc │ │ │ │ ├── users.cpython-312.pyc │ │ │ │ ├── wallet.cpython-312.pyc │ │ │ │ ├── __init__.cpython-312.pyc │ │ │ │ ├── replays.cpython-312.pyc │ │ │ │ ├── challenges.cpython-312.pyc │ │ │ │ ├── enrollments.cpython-312.pyc │ │ │ │ ├── leaderboard.cpython-312.pyc │ │ │ │ ├── achievements.cpython-312.pyc │ │ │ │ ├── skill_profiles.cpython-312.pyc │ │ │ │ └── ai_generated_challenges.cpython-312.pyc │ │ │ ├── teams.py │ │ │ ├── users.py │ │ │ ├── leaderboard.py │ │ │ ├── challenges.py │ │ │ ├── judge.py │ │ │ ├── replays.py │ │ │ ├── enrollments.py │ │ │ ├── chat.py │ │ │ ├── skill_profiles.py │ │ │ ├── wallet.py │ │ │ ├── achievements.py │ │ │ └── ai_generated_challenges.py │ │ ├── __pycache__ │ │ │ ├── api.cpython-312.pyc │ │ │ └── __init__.cpython-312.pyc │ │ └── api.py │ ├── core │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-312.pyc │ │ │ ├── config.cpython-312.pyc │ │ │ └── security.cpython-312.pyc │ │ └── config.py │ ├── db │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── base.cpython-312.pyc │ │ │ ├── session.cpython-312.pyc │ │ │ ├── __init__.cpython-312.pyc │ │ │ └── base_class.cpython-312.pyc │ │ ├── base_class.py │ │ ├── base.py │ │ └── session.py │ ├── models │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── team.cpython-312.pyc │ │ │ ├── user.cpython-312.pyc │ │ │ ├── __init__.cpython-312.pyc │ │ │ └── challenge.cpython-312.pyc │ │ ├── team.py │ │ ├── user.py │ │ └── challenge.py │ ├── services │ │ ├── __init__.py │ │ ├── ai_judge │ │ │ ├── __init__.py │ │ │ ├── rubric.py │ │ │ └── code_quality.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-312.pyc │ │ │ ├── ai_judge_service.cpython-312.pyc │ │ │ └── supabase_service.cpython-312.pyc │ │ ├── config.py │ │ ├── github_service.py │ │ ├── ai_judge_service.py │ │ └── supabase_service.py │ ├── __pycache__ │ │ ├── main.cpython-312.pyc │ │ └── __init__.cpython-312.pyc │ ├── schemas │ │ ├── __pycache__ │ │ │ ├── chat.cpython-312.pyc │ │ │ ├── team.cpython-312.pyc │ │ │ ├── user.cpython-312.pyc │ │ │ ├── replay.cpython-312.pyc │ │ │ ├── wallet.cpython-312.pyc │ │ │ ├── __init__.cpython-312.pyc │ │ │ ├── challenge.cpython-312.pyc │ │ │ ├── enrollment.cpython-312.pyc │ │ │ ├── achievement.cpython-312.pyc │ │ │ ├── skill_profile.cpython-312.pyc │ │ │ └── ai_generated_challenge.cpython-312.pyc │ │ ├── skill_profile.py │ │ ├── chat.py │ │ ├── replay.py │ │ ├── team.py │ │ ├── achievement.py │ │ ├── ai_generated_challenge.py │ │ ├── enrollment.py │ │ ├── __init__.py │ │ ├── wallet.py │ │ ├── user.py │ │ └── challenge.py │ └── main.py ├── db │ ├── __init__.py │ └── supabase.sql ├── finetune │ ├── __init__.py │ ├── strawberry-phi.parquet │ ├── convert.py │ └── readme.md ├── tests │ ├── __init__.py │ ├── api │ │ └── __init__.py │ ├── services │ │ └── __init__.py │ └── conftest.py ├── test.db ├── .env.example ├── Dockerfile ├── pyproject.toml └── supabase-test.py ├── backend copy ├── app │ ├── __init__.py │ ├── api │ │ ├── __init__.py │ │ ├── endpoints │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── auth.cpython-312.pyc │ │ │ │ ├── judge.cpython-312.pyc │ │ │ │ ├── teams.cpython-312.pyc │ │ │ │ ├── users.cpython-312.pyc │ │ │ │ ├── __init__.cpython-312.pyc │ │ │ │ ├── challenges.cpython-312.pyc │ │ │ │ └── leaderboard.cpython-312.pyc │ │ │ ├── teams.py │ │ │ ├── users.py │ │ │ ├── leaderboard.py │ │ │ ├── challenges.py │ │ │ ├── judge.py │ │ │ └── auth.py │ │ ├── __pycache__ │ │ │ ├── api.cpython-312.pyc │ │ │ └── __init__.cpython-312.pyc │ │ └── api.py │ ├── core │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-312.pyc │ │ │ ├── config.cpython-312.pyc │ │ │ └── security.cpython-312.pyc │ │ ├── security.py │ │ └── config.py │ ├── db │ │ ├── __init__.py │ │ ├── base_class.py │ │ ├── __pycache__ │ │ │ ├── base.cpython-312.pyc │ │ │ ├── session.cpython-312.pyc │ │ │ ├── __init__.cpython-312.pyc │ │ │ └── base_class.cpython-312.pyc │ │ ├── base.py │ │ └── session.py │ ├── models │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── team.cpython-312.pyc │ │ │ ├── user.cpython-312.pyc │ │ │ ├── __init__.cpython-312.pyc │ │ │ └── challenge.cpython-312.pyc │ │ ├── team.py │ │ ├── user.py │ │ └── challenge.py │ ├── schemas │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── team.cpython-312.pyc │ │ │ ├── user.cpython-312.pyc │ │ │ ├── __init__.cpython-312.pyc │ │ │ └── challenge.cpython-312.pyc │ │ ├── team.py │ │ ├── user.py │ │ └── challenge.py │ ├── services │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-312.pyc │ │ │ ├── ai_judge_service.cpython-312.pyc │ │ │ └── supabase_service.cpython-312.pyc │ │ ├── github_service.py │ │ ├── supabase_service.py │ │ └── ai_judge_service.py │ ├── __pycache__ │ │ ├── main.cpython-312.pyc │ │ └── __init__.cpython-312.pyc │ └── main.py ├── tests │ ├── __init__.py │ ├── api │ │ └── __init__.py │ ├── services │ │ └── __init__.py │ └── conftest.py ├── test.db ├── finetune │ ├── strawberry-phi.parquet │ ├── convert.py │ └── readme.md ├── .env.example ├── Dockerfile └── pyproject.toml ├── docs ├── governance │ ├── founding_league_charter.md │ ├── financial_management.md │ ├── conflict_resolution.md │ ├── decision_making.md │ └── meritocracy.md ├── changelog.md ├── modules.md ├── performance.md ├── development-guidelines.md ├── environment.md ├── testing.md └── prompts.md ├── bun.lockb ├── public └── favicon.ico ├── gpt-engineer.toml ├── jsconfig.json ├── postcss.config.js ├── src ├── lib │ └── utils.js ├── components │ ├── ui │ │ ├── aspect-ratio.jsx │ │ ├── skeleton.jsx │ │ ├── collapsible.jsx │ │ ├── label.jsx │ │ ├── textarea.jsx │ │ ├── separator.jsx │ │ ├── progress.jsx │ │ ├── input.jsx │ │ ├── sonner.jsx │ │ ├── toaster.jsx │ │ ├── checkbox.jsx │ │ ├── slider.jsx │ │ ├── switch.jsx │ │ ├── tooltip.jsx │ │ ├── badge.jsx │ │ ├── hover-card.jsx │ │ ├── avatar.jsx │ │ ├── popover.jsx │ │ ├── date-picker.jsx │ │ ├── radio-group.jsx │ │ ├── toggle.jsx │ │ ├── toggle-group.jsx │ │ ├── alert.jsx │ │ ├── scroll-area.jsx │ │ ├── card.jsx │ │ ├── tabs.jsx │ │ ├── resizable.jsx │ │ ├── accordion.jsx │ │ ├── button.jsx │ │ └── input-otp.jsx │ ├── SponsorSection.jsx │ ├── CallToAction.jsx │ ├── HeroSection.jsx │ ├── ChallengeCard.jsx │ ├── admin │ │ ├── ChallengeList.jsx │ │ ├── SecurityCompliance.jsx │ │ ├── AnalyticsReporting.jsx │ │ ├── SystemHealthTab.jsx │ │ ├── SecurityTab.jsx │ │ ├── SupportTab.jsx │ │ ├── GamificationTab.jsx │ │ ├── APIManagementTab.jsx │ │ ├── EventsTab.jsx │ │ ├── BackupRecoveryTab.jsx │ │ ├── IntegrationsTab.jsx │ │ ├── LeaderboardTab.jsx │ │ ├── LocalizationTab.jsx │ │ ├── NotificationsTab.jsx │ │ ├── HomeTab.jsx │ │ ├── modals │ │ │ ├── BanUserModal.jsx │ │ │ ├── ChatLogReviewModal.jsx │ │ │ └── UserEditModal.jsx │ │ └── SystemConfiguration.jsx │ ├── Header.jsx │ └── EnrollmentModal.jsx ├── main.jsx ├── nav-items.jsx ├── pages │ ├── Index.jsx │ ├── Analytics.jsx │ ├── ForgotPassword.jsx │ └── Home.jsx ├── integrations │ └── supabase │ │ ├── hooks │ │ ├── ai_judging.js │ │ ├── skill_profiles.js │ │ ├── auth.js │ │ ├── chat_messages.js │ │ ├── wallet.js │ │ ├── ai_generated_challenges.js │ │ ├── transactions.js │ │ ├── challenge_management.js │ │ ├── replays.js │ │ ├── profiles.js │ │ ├── user_achievements.js │ │ └── achievements.js │ │ ├── supabase.js │ │ └── auth.jsx └── hooks │ ├── useDocumentation.js │ └── useOpenAI.js ├── .replit ├── .env ├── .gitignore ├── components.json ├── .gpt_engineer ├── get-user-snapshot.js ├── index.js └── report-url-change.js ├── .eslintrc.cjs ├── vite.config.js ├── index.html └── app └── services └── supabase_service.py /backend/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/app/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/db/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend copy/app/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/app/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/app/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/app/db/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/finetune/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend copy/app/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend copy/app/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend copy/app/db/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend copy/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/app/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/app/services/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/tests/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend copy/app/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend copy/app/schemas/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend copy/app/services/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend copy/tests/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/tests/services/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend copy/tests/services/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/app/services/ai_judge/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/governance/founding_league_charter.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/app/api/endpoints/__init__.py: -------------------------------------------------------------------------------- 1 | from . import judge 2 | -------------------------------------------------------------------------------- /backend copy/app/api/endpoints/__init__.py: -------------------------------------------------------------------------------- 1 | from . import judge 2 | -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/bun.lockb -------------------------------------------------------------------------------- /backend/test.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/test.db -------------------------------------------------------------------------------- /backend/tests/conftest.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | # Define fixtures for testing 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /backend copy/test.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/test.db -------------------------------------------------------------------------------- /backend copy/tests/conftest.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | # Define fixtures for testing 4 | -------------------------------------------------------------------------------- /gpt-engineer.toml: -------------------------------------------------------------------------------- 1 | [run] 2 | build = "npm run build" 3 | 4 | [gptengineer-app] 5 | project_id = "..." -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "@/*": ["./src/*"] 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /backend/finetune/strawberry-phi.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/finetune/strawberry-phi.parquet -------------------------------------------------------------------------------- /backend copy/finetune/strawberry-phi.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/finetune/strawberry-phi.parquet -------------------------------------------------------------------------------- /backend/app/__pycache__/main.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/__pycache__/main.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/__pycache__/api.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/__pycache__/api.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/db/__pycache__/base.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/db/__pycache__/base.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/db/base_class.py: -------------------------------------------------------------------------------- 1 | # app/db/base_class.py 2 | 3 | from sqlalchemy.orm import declarative_base 4 | 5 | Base = declarative_base() 6 | -------------------------------------------------------------------------------- /backend copy/app/__pycache__/main.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/__pycache__/main.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/db/base_class.py: -------------------------------------------------------------------------------- 1 | # app/db/base_class.py 2 | 3 | from sqlalchemy.orm import declarative_base 4 | 5 | Base = declarative_base() 6 | -------------------------------------------------------------------------------- /backend/app/db/__pycache__/session.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/db/__pycache__/session.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/api/__pycache__/api.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/api/__pycache__/api.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/db/__pycache__/base.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/db/__pycache__/base.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/core/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/core/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/core/__pycache__/config.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/core/__pycache__/config.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/core/__pycache__/security.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/core/__pycache__/security.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/db/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/db/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/db/__pycache__/base_class.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/db/__pycache__/base_class.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/models/__pycache__/team.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/models/__pycache__/team.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/models/__pycache__/user.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/models/__pycache__/user.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/schemas/__pycache__/chat.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/schemas/__pycache__/chat.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/schemas/__pycache__/team.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/schemas/__pycache__/team.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/schemas/__pycache__/user.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/schemas/__pycache__/user.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/db/__pycache__/session.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/db/__pycache__/session.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/models/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/models/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/schemas/__pycache__/replay.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/schemas/__pycache__/replay.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/schemas/__pycache__/wallet.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/schemas/__pycache__/wallet.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/api/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/api/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/core/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/core/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/core/__pycache__/config.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/core/__pycache__/config.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/core/__pycache__/security.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/core/__pycache__/security.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/db/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/db/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/db/__pycache__/base_class.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/db/__pycache__/base_class.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/models/__pycache__/team.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/models/__pycache__/team.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/models/__pycache__/user.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/models/__pycache__/user.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/schemas/__pycache__/team.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/schemas/__pycache__/team.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/schemas/__pycache__/user.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/schemas/__pycache__/user.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/auth.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/auth.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/chat.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/chat.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/models/__pycache__/challenge.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/models/__pycache__/challenge.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/schemas/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/schemas/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/schemas/__pycache__/challenge.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/schemas/__pycache__/challenge.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/schemas/__pycache__/enrollment.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/schemas/__pycache__/enrollment.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/services/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/services/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/models/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/models/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/judge.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/judge.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/teams.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/teams.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/users.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/users.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/wallet.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/wallet.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/schemas/__pycache__/achievement.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/schemas/__pycache__/achievement.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/api/endpoints/__pycache__/auth.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/api/endpoints/__pycache__/auth.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/models/__pycache__/challenge.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/models/__pycache__/challenge.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/schemas/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/schemas/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/schemas/__pycache__/challenge.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/schemas/__pycache__/challenge.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/services/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/services/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/replays.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/replays.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/schemas/__pycache__/skill_profile.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/schemas/__pycache__/skill_profile.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/api/endpoints/__pycache__/judge.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/api/endpoints/__pycache__/judge.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/api/endpoints/__pycache__/teams.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/api/endpoints/__pycache__/teams.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/api/endpoints/__pycache__/users.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/api/endpoints/__pycache__/users.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/challenges.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/challenges.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/enrollments.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/enrollments.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/leaderboard.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/leaderboard.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/services/__pycache__/ai_judge_service.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/services/__pycache__/ai_judge_service.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/services/__pycache__/supabase_service.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/services/__pycache__/supabase_service.cpython-312.pyc -------------------------------------------------------------------------------- /src/lib/utils.js: -------------------------------------------------------------------------------- 1 | import { clsx } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /backend copy/app/api/endpoints/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/api/endpoints/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/achievements.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/achievements.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/skill_profiles.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/skill_profiles.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/api/endpoints/__pycache__/challenges.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/api/endpoints/__pycache__/challenges.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/api/endpoints/__pycache__/leaderboard.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/api/endpoints/__pycache__/leaderboard.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/services/__pycache__/ai_judge_service.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/services/__pycache__/ai_judge_service.cpython-312.pyc -------------------------------------------------------------------------------- /backend copy/app/services/__pycache__/supabase_service.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend copy/app/services/__pycache__/supabase_service.cpython-312.pyc -------------------------------------------------------------------------------- /backend/app/schemas/__pycache__/ai_generated_challenge.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/schemas/__pycache__/ai_generated_challenge.cpython-312.pyc -------------------------------------------------------------------------------- /src/components/ui/aspect-ratio.jsx: -------------------------------------------------------------------------------- 1 | import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" 2 | 3 | const AspectRatio = AspectRatioPrimitive.Root 4 | 5 | export { AspectRatio } 6 | -------------------------------------------------------------------------------- /backend/app/api/endpoints/__pycache__/ai_generated_challenges.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/aihl/HEAD/backend/app/api/endpoints/__pycache__/ai_generated_challenges.cpython-312.pyc -------------------------------------------------------------------------------- /src/main.jsx: -------------------------------------------------------------------------------- 1 | import ReactDOM from "react-dom/client"; 2 | import App from "./App.jsx"; 3 | import "./index.css"; 4 | 5 | ReactDOM.createRoot(document.getElementById("root")).render( 6 | 7 | ); 8 | -------------------------------------------------------------------------------- /backend/app/services/config.py: -------------------------------------------------------------------------------- 1 | judge_model_config = { 2 | "model": "gpt-4o-mini", 3 | "temperature": 0.2, 4 | "api_key_schema": "OPENAI_API_KEY", 5 | "max_tokens": 1000, 6 | "costs": (0.15, 0.6) 7 | } -------------------------------------------------------------------------------- /backend/.env.example: -------------------------------------------------------------------------------- 1 | SUPABASE_URL=your_supabase_project_url 2 | SUPABASE_KEY=your_supabase_api_key 3 | GITHUB_TOKEN=your_github_token 4 | SECRET_KEY=your_secret_key 5 | ALGORITHM=HS256 6 | ACCESS_TOKEN_EXPIRE_MINUTES=30 7 | OPENAI_API_KEY=your_openai_api_key 8 | -------------------------------------------------------------------------------- /backend copy/.env.example: -------------------------------------------------------------------------------- 1 | SUPABASE_URL=your_supabase_project_url 2 | SUPABASE_KEY=your_supabase_api_key 3 | GITHUB_TOKEN=your_github_token 4 | SECRET_KEY=your_secret_key 5 | ALGORITHM=HS256 6 | ACCESS_TOKEN_EXPIRE_MINUTES=30 7 | OPENAI_API_KEY=your_openai_api_key 8 | -------------------------------------------------------------------------------- /.replit: -------------------------------------------------------------------------------- 1 | modules = ["nodejs-20", "web"] 2 | run = "npm run dev" 3 | 4 | [nix] 5 | channel = "stable-24_05" 6 | 7 | [deployment] 8 | run = ["sh", "-c", "npm run dev"] 9 | deploymentTarget = "cloudrun" 10 | 11 | [[ports]] 12 | localPort = 8080 13 | externalPort = 80 14 | -------------------------------------------------------------------------------- /src/components/ui/skeleton.jsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }) { 7 | return (
); 8 | } 9 | 10 | export { Skeleton } 11 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | VITE_SUPABASE_PROJECT_URL=https://hpkluyywkugnyouucvwr.supabase.co/ 2 | VITE_SUPABASE_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imhwa2x1eXl3a3VnbnlvdXVjdndyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjU3MjYzOTYsImV4cCI6MjA0MTMwMjM5Nn0.3jjJHqj2Q1-5o7zvgvlxCnaZPZKw9-UiqHF8DpZuy0Y 3 | -------------------------------------------------------------------------------- /backend/app/db/base.py: -------------------------------------------------------------------------------- 1 | # app/db/base.py 2 | 3 | from app.db.base_class import Base # Import Base without causing circular imports 4 | 5 | # Import all models here for Alembic to recognize them 6 | from app.models.user import User 7 | from app.models.challenge import Challenge 8 | from app.models.team import Team 9 | -------------------------------------------------------------------------------- /backend copy/app/db/base.py: -------------------------------------------------------------------------------- 1 | # app/db/base.py 2 | 3 | from app.db.base_class import Base # Import Base without causing circular imports 4 | 5 | # Import all models here for Alembic to recognize them 6 | from app.models.user import User 7 | from app.models.challenge import Challenge 8 | from app.models.team import Team 9 | -------------------------------------------------------------------------------- /backend/app/services/github_service.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from app.core.config import settings 3 | 4 | # Define functions to interact with GitHub API 5 | # For example: 6 | def create_challenge_repo(challenge_id: str, title: str) -> str: 7 | # Logic to create a GitHub repository 8 | return "https://github.com/your-org/" + title 9 | -------------------------------------------------------------------------------- /backend copy/app/services/github_service.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from app.core.config import settings 3 | 4 | # Define functions to interact with GitHub API 5 | # For example: 6 | def create_challenge_repo(challenge_id: str, title: str) -> str: 7 | # Logic to create a GitHub repository 8 | return "https://github.com/your-org/" + title 9 | -------------------------------------------------------------------------------- /backend/app/api/endpoints/teams.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter 2 | from typing import List 3 | from app.schemas.team import TeamCreate, TeamOut 4 | 5 | router = APIRouter() 6 | 7 | @router.get("/", response_model=List[TeamOut]) 8 | async def list_teams(): 9 | # List teams logic here 10 | return [] 11 | 12 | # Additional endpoints... 13 | -------------------------------------------------------------------------------- /backend copy/app/api/endpoints/teams.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter 2 | from typing import List 3 | from app.schemas.team import TeamCreate, TeamOut 4 | 5 | router = APIRouter() 6 | 7 | @router.get("/", response_model=List[TeamOut]) 8 | async def list_teams(): 9 | # List teams logic here 10 | return [] 11 | 12 | # Additional endpoints... 13 | -------------------------------------------------------------------------------- /backend/app/api/endpoints/users.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter 2 | from typing import List 3 | from app.schemas.user import UserOut 4 | 5 | router = APIRouter() 6 | 7 | @router.get("/{user_id}", response_model=UserOut) 8 | async def get_user_profile(user_id: str): 9 | # Get user profile logic here 10 | return {} 11 | 12 | # Additional endpoints... 13 | -------------------------------------------------------------------------------- /backend copy/app/api/endpoints/users.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter 2 | from typing import List 3 | from app.schemas.user import UserOut 4 | 5 | router = APIRouter() 6 | 7 | @router.get("/{user_id}", response_model=UserOut) 8 | async def get_user_profile(user_id: str): 9 | # Get user profile logic here 10 | return {} 11 | 12 | # Additional endpoints... 13 | -------------------------------------------------------------------------------- /src/components/ui/collapsible.jsx: -------------------------------------------------------------------------------- 1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 2 | 3 | const Collapsible = CollapsiblePrimitive.Root 4 | 5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 6 | 7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 8 | 9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 10 | -------------------------------------------------------------------------------- /src/nav-items.jsx: -------------------------------------------------------------------------------- 1 | import { HomeIcon } from "lucide-react"; 2 | import Index from "./pages/Index.jsx"; 3 | 4 | /** 5 | * Central place for defining the navigation items. Used for navigation components and routing. 6 | */ 7 | export const navItems = [ 8 | { 9 | title: "Home", 10 | to: "/", 11 | icon: , 12 | page: , 13 | }, 14 | ]; 15 | -------------------------------------------------------------------------------- /backend copy/app/main.py: -------------------------------------------------------------------------------- 1 | # app/main.py 2 | 3 | from fastapi import FastAPI 4 | from app.api.api import api_router 5 | from app.db.session import engine 6 | from app.db.base import Base # This import registers all models 7 | 8 | # Create database tables 9 | Base.metadata.create_all(bind=engine) 10 | 11 | app = FastAPI(title="AI Hacking League Backend") 12 | 13 | app.include_router(api_router) 14 | -------------------------------------------------------------------------------- /backend/app/schemas/skill_profile.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | from uuid import UUID 3 | from typing import Dict 4 | 5 | class SkillProfileBase(BaseModel): 6 | user_id: UUID 7 | skills: Dict[str, int] 8 | 9 | class SkillProfileCreate(SkillProfileBase): 10 | pass 11 | 12 | class SkillProfileOut(SkillProfileBase): 13 | id: UUID 14 | 15 | class Config: 16 | from_attributes = True -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | .env 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | *auth.cpython* 26 | .venv/ 27 | *__pycache__/ -------------------------------------------------------------------------------- /backend copy/app/schemas/team.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | from uuid import UUID 3 | from datetime import datetime 4 | 5 | class TeamBase(BaseModel): 6 | name: str 7 | description: str 8 | 9 | class TeamCreate(TeamBase): 10 | pass 11 | 12 | class TeamOut(TeamBase): 13 | id: UUID 14 | created_by: UUID 15 | created_at: datetime 16 | 17 | class Config: 18 | from_attributes = True 19 | -------------------------------------------------------------------------------- /backend/app/schemas/chat.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | from uuid import UUID 3 | from datetime import datetime 4 | 5 | class ChatMessageBase(BaseModel): 6 | user_id: UUID 7 | content: str 8 | 9 | class ChatMessageCreate(ChatMessageBase): 10 | pass 11 | 12 | class ChatMessageOut(ChatMessageBase): 13 | id: UUID 14 | timestamp: datetime 15 | 16 | class Config: 17 | from_attributes = True -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": false, 5 | "tsx": false, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "src/index.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /backend copy/app/schemas/user.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel, EmailStr, Field 2 | from uuid import UUID 3 | from datetime import datetime 4 | 5 | class UserBase(BaseModel): 6 | username: str 7 | email: EmailStr 8 | 9 | class UserCreate(UserBase): 10 | password: str 11 | 12 | class UserOut(UserBase): 13 | id: UUID 14 | created_at: datetime 15 | 16 | class Config: 17 | from_attributes = True 18 | -------------------------------------------------------------------------------- /backend/app/schemas/replay.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | from uuid import UUID 3 | from datetime import datetime 4 | 5 | class ReplayBase(BaseModel): 6 | challenge_id: UUID 7 | user_id: UUID 8 | replay_data: str 9 | 10 | class ReplayCreate(ReplayBase): 11 | pass 12 | 13 | class ReplayOut(ReplayBase): 14 | id: UUID 15 | created_at: datetime 16 | 17 | class Config: 18 | from_attributes = True -------------------------------------------------------------------------------- /backend/app/api/endpoints/leaderboard.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter 2 | from typing import List 3 | 4 | router = APIRouter() 5 | 6 | @router.get("/") 7 | async def get_global_leaderboard(): 8 | # Logic to get global leaderboard 9 | return [] 10 | 11 | @router.get("/challenge/{challenge_id}") 12 | async def get_challenge_leaderboard(challenge_id: str): 13 | # Logic to get leaderboard for a specific challenge 14 | return [] 15 | -------------------------------------------------------------------------------- /backend copy/app/api/endpoints/leaderboard.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter 2 | from typing import List 3 | 4 | router = APIRouter() 5 | 6 | @router.get("/") 7 | async def get_global_leaderboard(): 8 | # Logic to get global leaderboard 9 | return [] 10 | 11 | @router.get("/challenge/{challenge_id}") 12 | async def get_challenge_leaderboard(challenge_id: str): 13 | # Logic to get leaderboard for a specific challenge 14 | return [] 15 | -------------------------------------------------------------------------------- /.gpt_engineer/get-user-snapshot.js: -------------------------------------------------------------------------------- 1 | import { toPng } from "html-to-image"; 2 | 3 | export const loadGetUserSnapshotEventListener = () => { 4 | window.addEventListener("blur", () => { 5 | toPng(document.body).then((url) => { 6 | window.top.postMessage({ type: "USER_SNAPSHOT", snapshot: url }, "http://localhost:3000"); 7 | window.top.postMessage({ type: "USER_SNAPSHOT", snapshot: url }, "https://gptengineer.app"); 8 | }); 9 | }); 10 | }; 11 | -------------------------------------------------------------------------------- /.gpt_engineer/index.js: -------------------------------------------------------------------------------- 1 | import { loadGetUserSnapshotEventListener } from "./get-user-snapshot"; 2 | import { loadReportUrlChangeEventListener } from "./report-url-change"; 3 | import { loadReportErrorEventListener } from "./report-error"; 4 | 5 | const main = () => { 6 | if (window.top === window.self) { 7 | return; 8 | } 9 | loadGetUserSnapshotEventListener(); 10 | loadReportUrlChangeEventListener(); 11 | loadReportErrorEventListener(); 12 | }; 13 | 14 | main(); 15 | -------------------------------------------------------------------------------- /backend/app/db/session.py: -------------------------------------------------------------------------------- 1 | # app/db/session.py 2 | 3 | from sqlalchemy import create_engine 4 | from sqlalchemy.orm import sessionmaker 5 | from app.db.base_class import Base # Import Base if necessary 6 | 7 | SQLALCHEMY_DATABASE_URL = "sqlite:///./test.db" # Use SQLite for simplicity 8 | 9 | engine = create_engine( 10 | SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} 11 | ) 12 | 13 | SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) 14 | -------------------------------------------------------------------------------- /backend copy/app/db/session.py: -------------------------------------------------------------------------------- 1 | # app/db/session.py 2 | 3 | from sqlalchemy import create_engine 4 | from sqlalchemy.orm import sessionmaker 5 | from app.db.base_class import Base # Import Base if necessary 6 | 7 | SQLALCHEMY_DATABASE_URL = "sqlite:///./test.db" # Use SQLite for simplicity 8 | 9 | engine = create_engine( 10 | SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} 11 | ) 12 | 13 | SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) 14 | -------------------------------------------------------------------------------- /backend/finetune/convert.py: -------------------------------------------------------------------------------- 1 | import pyarrow.parquet as pq 2 | import pandas as pd 3 | import sys 4 | 5 | # Read the Parquet file 6 | parquet_file = sys.argv[1] # Pass the Parquet file path as an argument 7 | table = pq.read_table(parquet_file) 8 | 9 | # Convert to pandas DataFrame 10 | df = table.to_pandas() 11 | 12 | # Convert to JSONL and save 13 | output_file = 'output.jsonl' 14 | df.to_json(output_file, orient='records', lines=True) 15 | 16 | print(f"Conversion complete. JSONL file saved as {output_file}") 17 | -------------------------------------------------------------------------------- /backend copy/finetune/convert.py: -------------------------------------------------------------------------------- 1 | import pyarrow.parquet as pq 2 | import pandas as pd 3 | import sys 4 | 5 | # Read the Parquet file 6 | parquet_file = sys.argv[1] # Pass the Parquet file path as an argument 7 | table = pq.read_table(parquet_file) 8 | 9 | # Convert to pandas DataFrame 10 | df = table.to_pandas() 11 | 12 | # Convert to JSONL and save 13 | output_file = 'output.jsonl' 14 | df.to_json(output_file, orient='records', lines=True) 15 | 16 | print(f"Conversion complete. JSONL file saved as {output_file}") 17 | -------------------------------------------------------------------------------- /backend/app/api/endpoints/challenges.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter, Depends, HTTPException, status 2 | from typing import List 3 | from app.schemas.challenge import ChallengeCreate, ChallengeOut 4 | from app.services.supabase_service import supabase_client 5 | from app.models.challenge import Challenge 6 | 7 | router = APIRouter() 8 | 9 | @router.get("/", response_model=List[ChallengeOut]) 10 | async def list_challenges(): 11 | # List challenges logic here 12 | return [] 13 | 14 | # Additional endpoints... 15 | -------------------------------------------------------------------------------- /backend copy/app/api/endpoints/challenges.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter, Depends, HTTPException, status 2 | from typing import List 3 | from app.schemas.challenge import ChallengeCreate, ChallengeOut 4 | from app.services.supabase_service import supabase_client 5 | from app.models.challenge import Challenge 6 | 7 | router = APIRouter() 8 | 9 | @router.get("/", response_model=List[ChallengeOut]) 10 | async def list_challenges(): 11 | # List challenges logic here 12 | return [] 13 | 14 | # Additional endpoints... 15 | -------------------------------------------------------------------------------- /src/pages/Index.jsx: -------------------------------------------------------------------------------- 1 | // Update this page (the content is just a fallback if you fail to update the page) 2 | 3 | const Index = () => { 4 | return ( 5 |
6 |
7 |

Welcome to Your Blank App

8 |

Start building your amazing project here!

9 |
10 |
11 | ); 12 | }; 13 | 14 | export default Index; 15 | -------------------------------------------------------------------------------- /backend/finetune/readme.md: -------------------------------------------------------------------------------- 1 | # finetune 2 | 3 | ``` 4 | import pyarrow.parquet as pq 5 | import pandas as pd 6 | import sys 7 | 8 | # Read the Parquet file 9 | parquet_file = sys.argv[1] # Pass the Parquet file path as an argument 10 | table = pq.read_table(parquet_file) 11 | 12 | # Convert to pandas DataFrame 13 | df = table.to_pandas() 14 | 15 | # Convert to JSONL and save 16 | output_file = 'output.jsonl' 17 | df.to_json(output_file, orient='records', lines=True) 18 | 19 | print(f"Conversion complete. JSONL file saved as {output_file}") 20 | ``` 21 | -------------------------------------------------------------------------------- /backend copy/finetune/readme.md: -------------------------------------------------------------------------------- 1 | # finetune 2 | 3 | ``` 4 | import pyarrow.parquet as pq 5 | import pandas as pd 6 | import sys 7 | 8 | # Read the Parquet file 9 | parquet_file = sys.argv[1] # Pass the Parquet file path as an argument 10 | table = pq.read_table(parquet_file) 11 | 12 | # Convert to pandas DataFrame 13 | df = table.to_pandas() 14 | 15 | # Convert to JSONL and save 16 | output_file = 'output.jsonl' 17 | df.to_json(output_file, orient='records', lines=True) 18 | 19 | print(f"Conversion complete. JSONL file saved as {output_file}") 20 | ``` 21 | -------------------------------------------------------------------------------- /backend copy/app/core/security.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime, timedelta 2 | from jose import jwt 3 | from app.core.config import settings 4 | 5 | def create_access_token(data: dict, expires_delta: timedelta = None): 6 | to_encode = data.copy() 7 | expire = datetime.utcnow() + expires_delta if expires_delta else datetime.utcnow() + timedelta(minutes=settings.ACCESS_TOKEN_EXPIRE_MINUTES) 8 | to_encode.update({"exp": expire}) 9 | encoded_jwt = jwt.encode(to_encode, settings.SECRET_KEY, algorithm=settings.ALGORITHM) 10 | return encoded_jwt 11 | -------------------------------------------------------------------------------- /backend/app/main.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI, Request 2 | from fastapi.responses import RedirectResponse 3 | from app.api.api import api_router 4 | from app.db.session import engine 5 | from app.db.base import Base # This import registers all models 6 | 7 | # Create database tables 8 | Base.metadata.create_all(bind=engine) 9 | 10 | app = FastAPI(title="AI Hacking League Backend") 11 | 12 | app.include_router(api_router) 13 | 14 | @app.post("/token") 15 | async def token_redirect(request: Request): 16 | return RedirectResponse(url="/auth/login", status_code=307) -------------------------------------------------------------------------------- /backend/app/schemas/team.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | from uuid import UUID 3 | from datetime import datetime 4 | from typing import Optional 5 | 6 | class TeamBase(BaseModel): 7 | name: str 8 | description: str 9 | 10 | class TeamCreate(TeamBase): 11 | pass 12 | 13 | class TeamOut(TeamBase): 14 | id: UUID 15 | created_by: UUID 16 | created_at: datetime 17 | 18 | class Config: 19 | from_attributes = True 20 | 21 | class TeamUpdate(TeamBase): 22 | name: Optional[str] = None 23 | description: Optional[str] = None 24 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | "eslint:recommended", 6 | "plugin:react/recommended", 7 | "plugin:react/jsx-runtime", 8 | "plugin:react-hooks/recommended", 9 | ], 10 | ignorePatterns: ["dist", ".eslintrc.cjs"], 11 | parserOptions: { ecmaVersion: "latest", sourceType: "module" }, 12 | settings: { react: { version: "18.2" } }, 13 | plugins: ["react-refresh"], 14 | rules: { 15 | "react/jsx-no-target-blank": "off", 16 | "react/prop-types": "off", 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /backend/app/schemas/achievement.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | from uuid import UUID 3 | from datetime import datetime 4 | from typing import Optional 5 | 6 | class AchievementBase(BaseModel): 7 | name: str 8 | description: str 9 | 10 | class AchievementCreate(AchievementBase): 11 | pass 12 | 13 | class AchievementOut(AchievementBase): 14 | id: UUID 15 | created_at: datetime 16 | 17 | class Config: 18 | from_attributes = True 19 | 20 | class AchievementUpdate(AchievementBase): 21 | name: Optional[str] = None 22 | description: Optional[str] = None 23 | -------------------------------------------------------------------------------- /src/components/ui/label.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as LabelPrimitive from "@radix-ui/react-label" 3 | import { cva } from "class-variance-authority"; 4 | 5 | import { cn } from "@/lib/utils" 6 | 7 | const labelVariants = cva( 8 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 9 | ) 10 | 11 | const Label = React.forwardRef(({ className, ...props }, ref) => ( 12 | 13 | )) 14 | Label.displayName = LabelPrimitive.Root.displayName 15 | 16 | export { Label } 17 | -------------------------------------------------------------------------------- /backend/app/schemas/ai_generated_challenge.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | from uuid import UUID 3 | from datetime import datetime 4 | from typing import Optional 5 | from .challenge import DifficultyEnum 6 | 7 | class AIGeneratedChallengeBase(BaseModel): 8 | title: str 9 | description: str 10 | difficulty: DifficultyEnum 11 | ai_prompt: str 12 | 13 | class AIGeneratedChallengeCreate(AIGeneratedChallengeBase): 14 | pass 15 | 16 | class AIGeneratedChallengeOut(AIGeneratedChallengeBase): 17 | id: UUID 18 | created_at: datetime 19 | 20 | class Config: 21 | from_attributes = True -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "url"; 2 | import { defineConfig } from "vite"; 3 | import react from "@vitejs/plugin-react"; 4 | import { resolve } from "path"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | server: { 9 | host: "::", 10 | port: "8080", 11 | }, 12 | plugins: [react()], 13 | resolve: { 14 | alias: [ 15 | { 16 | find: "@", 17 | replacement: fileURLToPath(new URL("./src", import.meta.url)), 18 | }, 19 | { 20 | find: "lib", 21 | replacement: resolve(__dirname, "lib"), 22 | }, 23 | ], 24 | }, 25 | }); 26 | -------------------------------------------------------------------------------- /backend copy/app/core/config.py: -------------------------------------------------------------------------------- 1 | # app/core/config.py 2 | 3 | import os 4 | from dotenv import load_dotenv 5 | 6 | load_dotenv() 7 | 8 | class Settings: 9 | OPENAI_API_KEY: str = os.getenv("OPENAI_API_KEY", "") 10 | SUPABASE_URL: str = os.getenv("SUPABASE_URL", "") 11 | SUPABASE_KEY: str = os.getenv("SUPABASE_KEY", "") 12 | GITHUB_TOKEN: str = os.getenv("GITHUB_TOKEN", "") 13 | SECRET_KEY: str = os.getenv("SECRET_KEY", "your-secret-key") 14 | ALGORITHM: str = os.getenv("ALGORITHM", "HS256") 15 | ACCESS_TOKEN_EXPIRE_MINUTES: int = int(os.getenv("ACCESS_TOKEN_EXPIRE_MINUTES", "30")) 16 | 17 | settings = Settings() 18 | -------------------------------------------------------------------------------- /backend/app/schemas/enrollment.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | from uuid import UUID 3 | from datetime import datetime 4 | from typing import Optional 5 | 6 | class EnrollmentBase(BaseModel): 7 | user_id: UUID 8 | challenge_id: UUID 9 | team_id: Optional[UUID] = None 10 | status: str = "enrolled" 11 | 12 | class EnrollmentCreate(EnrollmentBase): 13 | pass 14 | 15 | class EnrollmentOut(EnrollmentBase): 16 | id: UUID 17 | score: Optional[float] = None 18 | submitted_at: Optional[datetime] = None 19 | created_at: datetime 20 | updated_at: datetime 21 | 22 | class Config: 23 | from_attributes = True -------------------------------------------------------------------------------- /backend copy/app/api/api.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter 2 | from app.api.endpoints import auth, challenges, leaderboard, teams, users, judge 3 | 4 | api_router = APIRouter() 5 | api_router.include_router(auth.router, prefix="/auth", tags=["auth"]) 6 | api_router.include_router(challenges.router, prefix="/challenges", tags=["challenges"]) 7 | api_router.include_router(leaderboard.router, prefix="/leaderboard", tags=["leaderboard"]) 8 | api_router.include_router(teams.router, prefix="/teams", tags=["teams"]) 9 | api_router.include_router(users.router, prefix="/users", tags=["users"]) 10 | api_router.include_router(judge.router, prefix="/judge", tags=["judge"]) 11 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | AI Hacker League 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /backend/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use an official Python runtime as a parent image 2 | FROM python:3.9-slim 3 | 4 | # Set the working directory in the container 5 | WORKDIR /app 6 | 7 | # Copy the current directory contents into the container at /app 8 | COPY . /app 9 | 10 | # Install any needed packages specified in poetry 11 | RUN pip install --no-cache-dir poetry 12 | RUN poetry config virtualenvs.create false 13 | RUN poetry install --no-dev --no-interaction --no-ansi 14 | 15 | # Make port 8000 available to the world outside this container 16 | EXPOSE 8000 17 | 18 | # Run app.main:app when the container launches 19 | CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] 20 | -------------------------------------------------------------------------------- /backend copy/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use an official Python runtime as a parent image 2 | FROM python:3.9-slim 3 | 4 | # Set the working directory in the container 5 | WORKDIR /app 6 | 7 | # Copy the current directory contents into the container at /app 8 | COPY . /app 9 | 10 | # Install any needed packages specified in poetry 11 | RUN pip install --no-cache-dir poetry 12 | RUN poetry config virtualenvs.create false 13 | RUN poetry install --no-dev --no-interaction --no-ansi 14 | 15 | # Make port 8000 available to the world outside this container 16 | EXPOSE 8000 17 | 18 | # Run app.main:app when the container launches 19 | CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] 20 | -------------------------------------------------------------------------------- /backend copy/app/services/supabase_service.py: -------------------------------------------------------------------------------- 1 | # app/services/supabase_service.py 2 | 3 | from supabase import create_client, Client 4 | from app.core.config import settings 5 | 6 | def get_supabase_client() -> Client: 7 | try: 8 | if settings.SUPABASE_URL and settings.SUPABASE_KEY: 9 | return create_client(settings.SUPABASE_URL, settings.SUPABASE_KEY) 10 | else: 11 | print("Warning: Supabase URL or Key is missing.") 12 | return None 13 | except Exception as e: 14 | print(f"An error occurred while initializing Supabase client: {e}") 15 | return None 16 | 17 | # Initialize the Supabase client 18 | supabase_client = get_supabase_client() 19 | -------------------------------------------------------------------------------- /src/components/ui/textarea.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | const Textarea = React.forwardRef(({ className, ...props }, ref) => { 6 | return ( 7 | (