🚀 Getting Started
This guide walks you through setting up the LIPAIX project on your local machine. It's written for developers joining the project for the first time.
What you're setting up
The LIPAIX repository is a monorepo — a single repository containing multiple related applications:
apps/web— The public website + MyLipaix + backend API (all in one Next.js application)apps/discord-bot— The Discord bot serviceshared/common— Shared TypeScript code used by both appsdocs/vitepress— This documentation
In practice, you'll usually run just apps/web locally unless you're working on the bot.
Prerequisites
Before you start, install the following tools:
| Tool | Minimum version | What it's for |
|---|---|---|
| Node.js | 22+ | JavaScript runtime |
| pnpm | 9+ | Package manager (do not use npm or yarn) |
| Git | Any recent version | Version control |
| VS Code | — | Recommended editor |
To verify your installations:
node --version # should print v22.x.x or higher
pnpm --version # should print 9.x.x or higher
git --versionGetting the code
git clone https://github.com/lipaix/lipaix-web-v3.git
cd lipaix-web-v3
pnpm installpnpm install downloads all dependencies for all apps in the monorepo at once.
Environment variables
The apps need configuration values (database connection, API keys, etc.) that are stored in a .env.local file and never committed to git.
Get the .env.local file from a team administrator — don't try to create it from scratch. The file is shared privately within the team.
Place the file at apps/web/.env.local.
Key variables (web app)
| Variable | What it does |
|---|---|
DATABASE_URI | PostgreSQL connection string |
PAYLOAD_SECRET | Secret key for PayloadCMS session encryption |
DISCORD_BOT_TOKEN | Token for the Discord bot (used by the web app for Discord login) |
DISCORD_CLIENT_ID | Discord OAuth application ID |
DISCORD_CLIENT_SECRET | Discord OAuth application secret |
LIPAIX_API_TOKEN | Internal API token used by the Discord bot to call the web API |
BASE_URL | The URL where the app runs (e.g., http://localhost:3000 locally) |
Key variables (Discord bot)
For the Discord bot, create apps/discord-bot/.env.local (also get this from a team admin):
| Variable | What it does |
|---|---|
DISCORD_BOT_TOKEN | The bot's secret token |
DISCORD_BOT_APP_ID | The bot's application ID |
DISCORD_GUILD_ID | The Discord server (guild) ID where the bot operates |
MYLIPAIX_BASE_URL | The URL of the web app (for API calls) |
LIPAIX_DISCORD_ACTION | Internal action token |
BILLETWEB_API_KEY | Billetweb API key for the /tickets command |
BILLETWEB_USER | Billetweb user identifier |
Running the web app
From the root of the repository:
pnpm web:devThis starts the Next.js development server. Once running:
- Public website:
http://localhost:3000 - MyLipaix:
http://localhost:3000/admin
The first time you run it, PayloadCMS will prompt you to create an initial admin user. Follow the on-screen instructions.
Running the Discord bot
In a separate terminal:
pnpm discord:devThe bot connects to Discord and starts listening for slash commands.
Registering slash commands
Slash commands (/dispos, /selecs, /tickets) need to be registered with Discord once before they appear in the server. Run:
pnpm discord:commands:registerYou only need to do this when commands are added or changed.
Running the documentation
pnpm docs:devThe documentation site runs at http://localhost:3001.
Database migrations
When the database schema changes (PayloadCMS collections are added or modified), you need to run migrations:
pnpm web:db:migrateCommon issues
"Cannot find module" errors after pnpm install
Run pnpm build in shared/common first — the shared package must be built before the apps can use it:
pnpm common:buildDatabase connection errors
Check that your DATABASE_URI in .env.local is correct and that the PostgreSQL database is reachable.
Discord bot doesn't respond to commands
Make sure commands are registered (pnpm discord:commands:register) and that the DISCORD_GUILD_ID matches the server you're testing in.
