An interactive AI learning platform that combines theory with hands-on experience using real AI models.
This project consists of two active components:
- Backend (
/backend): TypeScript API server using Encore.dev framework - Web (
/web): Next.js app with Clerk authentication (single source of truth for the UI)
Deprecated:
Frontend (React SPA (Vite) — archived under/frontend)attic/frontend/DEPRECATED.mdLegacy Frontend (— archived under/_legacy_frontend)attic/_legacy_frontend/DEPRECATED.md
- Node.js 18+ and npm
- Go (for Encore.dev backend)
- Python 3.8+ (for AI/ML dependencies)
# Install all workspace dependencies
npm install
# Install Python dependencies
pip install -r requirements.txtCopy the example configuration:
cp env-config-example.txt .env.localFill in your API keys:
- Clerk: Get from Clerk Dashboard
- Poe API: Get from Poe API Settings
- OpenAI: Get from OpenAI Platform
Set up secrets for the backend:
encore secret set POE_API_KEY
encore secret set OPENAI_API_KEY
encore secret set OPENAI_BASE_URL# Terminal 1: Backend (Encore.dev)
npm run dev:backend
# Terminal 2: Web App (Next.js + Clerk)
npm run dev:webalain-ai-learning-platform/
├── backend/ # Encore.dev TypeScript API
│ ├── execution/ # AI model execution endpoints
│ ├── tutorials/ # Tutorial management
│ └── progress/ # User progress tracking
├── frontend/ # Deprecated (see frontend/DEPRECATED.md)
├── web/ # Next.js authentication app
│ └── app/ # Next.js app router
├── requirements.txt # Python dependencies
└── requirements-dev.txt # Development dependencies
# Install all dependencies
npm run install:all
# Start individual services
npm run dev:backend # Start Encore backend
npm run dev:web # Start Next.js web app
# Build for production
npm run build:web # Build Next.js app- Sign up at Clerk
- Create a new application
- Copy publishable key and secret key to
.env.local
ALAIn supports multiple Poe integration approaches:
Recommended: Node.js OpenAI SDK
npm install openai@^4.28.0Alternative: Python SDK
pip install fastapi-poe- Visit Poe API Settings
- Generate an API key
- Add to environment variables:
POE_API_KEY=your_key_here
- Visit OpenAI Platform
- Create a new API key
- Add to environment variables:
OPENAI_API_KEY=your_key_here
The project uses PostgreSQL with Encore.dev's built-in database management. The database schema is automatically created through migrations.
To seed sample data:
curl -X POST "http://localhost:4000/seed"# Run Python tests
pytest
# Run frontend type checking
cd frontend && npm run type-check
# Run web app linting
cd web && npm run lintencore auth login
git remote add encore encore://alain-ai-learning-platform-rui2
git push encorecd web
npm run build
npm run start
# Deploy to Vercel, Netlify, or your preferred platform- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
This project is open source and available under the MIT License.
- Encore CLI not found: Install with
brew install encoredev/tap/encore - Port conflicts: Check if ports 4000, 5173, 3000 are available
- API key errors: Verify environment variables are set correctly
- Database issues: Ensure PostgreSQL is running and accessible
- Check the DEVELOPMENT.md for detailed setup instructions
- Review the Encore.dev documentation
- Open an issue for bugs or feature requests