Development Setup
Get Rarebox running locally for development.
Prerequisites
- Node.js 18+ (LTS recommended)
- npm 9+
- Git
Clone & Install
git clone https://github.com/novaoc/rarebox.git
cd rarebox
npm installStart Dev Server
npm run devOpens at http://localhost:5173. Vite provides instant HMR — changes to Vue components, CSS, and JS reflect immediately.
Test Serverless Functions Locally
The Python serverless functions in api/ can be tested with the Vercel CLI:
npm i -g vercel
vercel devThis starts a combined dev server: Vite handles the frontend, Vercel CLI emulates the serverless function runtime. API endpoints are available at /api/*.
Python Dependencies
The serverless functions require Python 3.9+ with:
pip install httpx beautifulsoup4These are specified in requirements.txt and installed automatically by Vercel during deployment.
Environment Variables
Create a .env file in the project root if needed:
# Optional: pokemontcg.io API key for higher rate limits (20k/day without, more with)
# VITE_POKEMONTCG_API_KEY=your-key-hereTIP
You don't need an API key to develop locally. The default rate limit (20,000 requests/day) is more than enough for development.
Build for Production
npm run buildOutputs to dist/. Preview the production build locally:
npm run previewProject Structure
See Project Structure for a full walkthrough of the codebase.