This is my first real full-stack app. We partly built it together in our React lessons and partly I was building it at home. I tried to make it an adventure with a little game and eventually you get some learning expierience from it. You can explore countries, see real-time weather data for their capitals, play the game, and keep track of your favorites! Plus, secure login with Supabase authentication gives you access to protected content and you can choose between dark and light mode. 🐠🐝
You can visit the app here:
https://countries-stabjana.onrender.com
project-root/
├── backend/ # NestJS application
└── frontend/ # React application- Node.js (v18 or higher recommended)
- npm (comes with Node.js)
- Clone the repository:
git clone https://github.com/your-username/countries-fullstack-react.git
cd countries-fullstack-react- Install all dependencies (both frontend and backend):
npm run install:allStart both frontend and backend development servers:
npm run devThe applications will be available at:
- Frontend: http://localhost:5180
- Backend: http://localhost:3000
✨ Explore Countries – Browse through a vast collection of countries with detailed info.
🌦 Live Weather Data – Check real-time weather for each capital city.
🎏 Flag Game – Test your knowledge with a fun flag quiz!
❤️ Favourites – Save your favorite countries and keep track of them.
🔐 Secure Authentication – Supabase login for exclusive content.
npm run dev– Start both frontend and backend in development modenpm run dev:frontend– Start only the frontendnpm run dev:backend– Start only the backendnpm run install:all– Install dependencies for both projectsnpm run install:frontend– Install frontend dependenciesnpm run install:backend– Install backend dependenciesnpm run build– Build both projectsnpm run build:frontend– Build frontend onlynpm run build:backend– Build backend only
- Backend Configuration
Create a.envfile in thebackend/directory:
SUPABASE_URL=https://your-supabase-instance.supabase.co
SUPABASE_ANON_KEY=your-anon-key- Frontend Configuration
Create an.envfile in thefrontend/directory and define the API key for weather data:
API_KEY=your-api-key(Get a free API key from a weather data provider like OpenWeatherMap)
- React + TypeScript
- Vite
- Material UI
- NestJS + TypeScript
- Supabase (Authentication & Database)
- Backend includes CORS configuration for the frontend port (5180)
- TypeScript is set up for both frontend and backend
- ESLint + Prettier for consistent code formatting
- Hot-reload enabled for a smooth development experience