E-kosmos is an interactive, educational web application designed to teach users about proper waste sorting and environmental protection through engaging gameplay.
"Gioca, impara, proteggi l'ambiente" (Play, learn, protect the environment). This project provides a fun way to learn about recycling and sustainability. Users can play the waste sorting challenge and compete for high scores on the leaderboard.
- React (with Vite)
- TypeScript
- Tailwind CSS for styling
- Radix UI primitives for accessible components
- Wouter for lightweight routing
- Framer Motion & Canvas Confetti for animations
- Node.js & Express
- Vercel Serverless Functions for API hosting
- Neon Database (Serverless Postgres)
- Drizzle ORM for database interactions
This project is structured as a monorepo using pnpm workspaces:
/artifacts/e-kosmos- The React frontend application./api- Express backend API routes, handling user scores and game logic.
-
Install dependencies: Make sure you have
pnpminstalled, then run:pnpm install
-
Environment Variables: Copy the example environment file and add your database credentials:
cp .env.example .env
Note: Ensure your Neon Database connection string is set up properly.
-
Run Development Server:
pnpm run dev
This will start both the frontend Vite server and the backend API (if configured in root scripts).
The application uses PostgreSQL with three main tables:
users: Tracks player usernames and details.games: Stores available game challenges.scores: Records user scores associated with specific games.
This project is licensed under the MIT License.