This is the backend for the Lovely Legends application, built with NestJS.
The project provides API endpoints for user management, settings, statistics, and Telegram bot integration.
$ npm install# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:covMake sure to set up the following environment variables:
MONGO_URI: MongoDB connection stringBOT_TOKEN: Telegram bot tokenWEB_APP: Web application URLTG_WEBHOOK: Telegram webhook URL
API documentation is available at /api-docs when the server is running.
When making requests from client to NestJS backend, include the Telegram authentication data in the headers:
fetch('http://your-api.com/users/123', {
headers: {
'X-Telegram-Auth': JSON.stringify(tgAuthData)
}
})This project is MIT licensed.