Market Intelligence Dashboard for Counter-Strike 2
Track prices, manage your inventory, and get AI-powered market insights.
| Feature | Description |
|---|---|
| Market Overview | Real-time price tracking with CSFloat, Pricempire, and Steam as data sources |
| Portfolio Management | Track your CS2 inventory value with historical price data |
| Top Movers | See which items are gaining or losing value |
| AI Chat | Market analysis powered by Google Gemini and OpenAI |
| News Feed | Aggregated CS2 market news via RSS |
| Item Detail | Candlestick price charts with TradingView Lightweight Charts |
| Responsive UI | Works on desktop, tablet, and mobile |
|
Next.js 16 |
TypeScript |
Prisma |
SQLite/Turso |
CSS Modules |
- Framework: Next.js 16 (App Router, React Compiler)
- Database: SQLite via Prisma + Turso (libSQL)
- Auth: NextAuth.js (Steam OpenID)
- Charts: TradingView Lightweight Charts
- AI: Google Gemini, OpenAI GPT
- Styling: CSS Modules (dark theme, OKX-inspired design system)
- Node.js 20+
- npm / pnpm / yarn
# Clone the repo
git clone https://github.com/kyokoxdev/CS2Vault.git
cd CS2Vault
# Install dependencies
npm install
# Copy environment template and fill in your keys
cp .env.example .env.local
# Generate Prisma client and create local database
npx prisma generate
npx prisma db push
# Seed default settings
npx tsx prisma/seed.ts
# Start development server
npm run devOpen http://localhost:3000.
Click to expand environment variables table
| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
Yes | SQLite path for local dev (default: file:./dev.db) |
TURSO_DATABASE_URL |
Vercel | Turso database URL (libsql://...) |
TURSO_AUTH_TOKEN |
Vercel | Turso auth token |
CRON_SECRET |
Vercel | Secret for Vercel Cron job auth |
STEAM_API_KEY |
Yes | Steam Web API key |
ALLOWED_STEAM_ID |
Yes | Your Steam64 ID for auth |
CSFLOAT_API_KEY |
Yes | CSFloat API key |
PRICEMPIRE_API_KEY |
No | Pricempire API key |
GEMINI_API_KEY |
No | Google AI Studio key |
OPENAI_API_KEY |
No | OpenAI API key |
GOOGLE_CLIENT_ID |
No | Google OAuth client ID (for Gemini OAuth flow) |
GOOGLE_CLIENT_SECRET |
No | Google OAuth client secret |
NEXTAUTH_SECRET |
Yes | Generate with openssl rand -hex 32 |
NEXTAUTH_URL |
Yes | App URL (default: http://localhost:3000) |
TOKEN_ENCRYPTION_KEY |
Yes | Encryption key for stored tokens |
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Production build |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run test |
Run Vitest tests |
npm run db:push:turso |
Push schema + seed to Turso |
This app uses Turso as the cloud database for Vercel deployment.
1. Set up Turso
# Install Turso CLI
curl -sSfL https://get.tur.so/install.sh | bash
# Create a database
turso db create cs2vault
# Get your credentials
turso db show cs2vault --url
turso db tokens create cs2vault2. Push schema to Turso
# Set credentials in .env.local, then:
npm run db:push:turso3. Deploy to Vercel
- Import the GitHub repo at vercel.com/new
- Add all environment variables from
.env.examplein the Vercel dashboard - Set the build command override:
npx prisma generate && next build - Deploy
4. Cron (automatic price sync)
The vercel.json configures a cron job that hits GET /api/sync every 5 minutes. It uses the CRON_SECRET env var for authentication. Make sure to set CRON_SECRET in Vercel.
For local development, the app uses a local SQLite file (dev.db) automatically — no Turso needed.
If you encounter OOM errors during build:
NODE_OPTIONS=--max-old-space-size=4096 npm run buildMIT © kyokoxdev