A competitive platform for practicing formal logic and natural deduction proofs.
- Natural deduction proof system with Fitch-style notation
- Interactive proof editor with syntax highlighting
- Real-time proof validation
- Practice mode with puzzles of varying difficulty
- Timed duel matches between players
- Elo-based rating system
- User profiles and statistics tracking
- Progressive tutorial system
- Secure authentication with Supabase
- Responsive design for mobile and desktop
- Next.js 14 (App Router)
- TypeScript
- Tailwind CSS
- Framer Motion
- Monaco Editor
- Supabase Auth (SSR)
- FastAPI
- PostgreSQL with SQLAlchemy
- Redis for caching and real-time features
- Supabase for authentication
- Custom natural deduction proof validator
- Support for propositional logic
- Fitch-style proof notation
- Node.js 18+
- Python 3.11+
- PostgreSQL 15+
- Redis
- Supabase account (for authentication)
-
Clone the repository:
git clone https://github.com/yourusername/LogicArena.git cd LogicArena -
Set up environment variables:
cp .env.example .env # Edit .env with your configuration # Add Supabase URL and keys
-
Install frontend dependencies:
cd front npm install -
Install backend dependencies:
cd gateway python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Run database migrations:
cd gateway python -m alembic upgrade head # Run Supabase auth migration python migrations/20250724_000003_add_supabase_id.py
-
Start the development servers:
Backend:
cd gateway uvicorn main:app --reloadFrontend:
cd front npm run dev -
Access the application at http://localhost:3000
- Create a project at supabase.com
- Copy your project URL and anon key
- Add to
.env:NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
- Enable email/password authentication in Supabase dashboard
- Configure redirect URLs for your domain
See docs/SUPABASE_AUTH_GUIDE.md for detailed setup instructions.
LogicArena/
├── front/ # Next.js frontend
│ ├── src/
│ │ ├── app/ # App router pages
│ │ ├── components/ # React components
│ │ ├── contexts/ # React contexts (Auth, Toast)
│ │ ├── hooks/ # Custom hooks
│ │ ├── lib/ # Utilities and API
│ │ └── utils/ # Supabase clients
│ └── public/ # Static assets
├── gateway/ # FastAPI backend
│ ├── app/
│ │ ├── models.py # SQLAlchemy models
│ │ ├── puzzles/ # Puzzle endpoints
│ │ ├── users/ # User endpoints
│ │ └── games/ # Game logic
│ └── migrations/ # Database migrations
├── puzzle/ # Proof validation service
└── docs/ # Documentation
- Solve puzzles at your own pace
- Multiple difficulty levels
- Category-based puzzle selection
- Hint system for learning
- Progress tracking
- 6 chapter lessons covering formal logic
- 3 interactive practice tutorials
- Step-by-step guidance
- Progress tracking
- Experience points and leveling
- Achievement system
- Puzzle solving statistics
- Activity history
- Mobile-optimized UI
- Touch-friendly interactions
- Adaptive layouts
- Progressive web app ready
Frontend:
cd front
npm testBackend:
cd gateway
pytestFrontend:
npm run lint
npm run typecheckBackend:
ruff check .
mypy .See docs/DEPLOYMENT.md for production deployment instructions.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
- Inspired by formal logic education needs
- Built with modern web technologies
- Powered by Supabase authentication