Skip to content

le-xot/games-movies-database

Repository files navigation

Development

Dependencies

Setup

  • Install dependencies
pnpm i
  • Run needed services (postgres)
docker compose -f ./docker-compose-dev.yml up -d
  • Generate prisma schema and migrate dev database
cd backend
pnpm prisma generate
pnpm prisma migrate dev
  • Start development
pnpm dev

Project Structure

  • frontend/ - Vue 3 application with Tailwind CSS
  • backend/ - NestJS API server with Prisma ORM
  • docker-compose-dev.yml - Development environment configuration

Available Scripts

  • pnpm dev - Start both frontend and backend in development mode
  • pnpm build - Build both frontend and backend for production
  • pnpm start:backend - Start the backend server in production mode
  • pnpm lint - Run ESLint on the entire project
  • pnpm lint:fix - Fix ESLint issues automatically

Third-party integrations

Twitch Authentication

To enable Twitch login functionality, fill in these environment variables in backend/.env:

TWITCH_CLIENT_ID=your_client_id
TWITCH_CLIENT_SECRET=your_client_secret
TWITCH_CALLBACK_URL=http://localhost:5173/auth/callback

You can obtain these credentials by:

  1. Going to Twitch Developer Console
  2. Creating a new application
  3. Setting the OAuth Redirect URL to http://localhost:5173/auth/callback

OpenWeatherMap Integration

To enable weather functionality, fill in these environment variables in backend/.env:

WEATHER_API_KEY=your_api_key
WEATHER_LAT=your_latitude
WEATHER_LON=your_longitude

You can get your API key by:

  1. Creating an account at OpenWeatherMap
  2. Going to API keys section
  3. Generating a new API key

Kinopoisk API

To enable movie data fetching, add your Kinopoisk API key to backend/.env:

KINOPOISK_API=your_api_key

TWIR Integration

To enable TWIR API integration, add your TWIR API key to backend/.env:

TWIR_API=your_api_key

This API key is used for authenticating requests from TWIR to your application.

Environment Setup

Copy the example environment file and update it with your settings:

cp backend/.env.example backend/.env

Database Administration

A web-based database admin interface is available at http://localhost:54321 when running the development environment.

API Documentation

API documentation is available at:

Contributing

  • Please make sure that you pull request to dev branch
  • To become an ADMIN please change seed.js with your actual twitch login and id

Troubleshooting

  • If you encounter database connection issues, make sure the PostgreSQL container is running
  • For authentication problems, verify your Twitch API credentials
  • Check the port configuration if services are not accessible (frontend: 5173, backend: 3000, database: 6543)

About

My own website

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •