The recommended production topology for Maleku System splits infrastructure across two managed platforms: Railway runs the FastAPI backend alongside its PostgreSQL database and Redis cache, while Vercel serves the Nuxt.js 3 frontend via its global edge network. This split lets each tier scale independently and keeps operational costs predictable — approximately $40/month for a production-grade setup.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/IvanchoDev89/maleku-system/llms.txt
Use this file to discover all available pages before exploring further.
Architecture
Railway — Backend
Hosts the FastAPI application, PostgreSQL 16 database, and Redis 7 cache. Railway automatically provisions
DATABASE_URL and REDIS_URL and injects them into your service environment at runtime.Vercel — Frontend
Hosts the Nuxt.js 3 SSR/static frontend. Vercel’s edge network distributes the built output globally and provides automatic preview deployments for every pull request.
Deploy Backend to Railway
Railway automatically injects
DATABASE_URL and REDIS_URL from the PostgreSQL and Redis services you provision into the same project. Do not set these values manually in the Variables tab — doing so will override Railway’s internal connection strings.Initialise the Railway project
Navigate to the backend directory and create a new Railway project. When prompted, select Create a new project and name it
costarica-backend.Provision PostgreSQL
Configure environment variables
In the Railway dashboard, open your backend service and go to the Variables tab. Add the following variables at minimum:See Environment Variables for the full reference.
Deploy the backend
From inside the Railway builds the Docker image, pushes it, and starts the service. Monitor the build logs in the dashboard until the deploy shows Active.
backend directory:Run database migrations
After the service is healthy, apply Alembic migrations against the provisioned PostgreSQL instance:
Deploy Frontend to Vercel
Update vercel.json with the Railway backend URL
Open
frontend/vercel.json and replace the placeholder values:your-railway-app-url→ the URL fromrailway domainyour-vercel-domain→ your custom domain (optional)
Set frontend environment variables
In the Vercel dashboard go to Settings → Environment Variables and add:These are the only two variables the Nuxt.js app requires at build and runtime.
Automated Deployment Script
The repository ships adeploy.sh script that wraps the Railway and Vercel CLI steps above:
Post-Deployment Checklist
After both services are live, complete the following steps:- Stripe webhook — In the Stripe Dashboard, create a webhook pointing to
https://your-backend.up.railway.app/api/v1/stripe/webhookand subscribe tocheckout.session.completedandinvoice.paid. - Resend domain — Verify the
costaricatravel.devsender domain in Resend and configure SPF/DKIM DNS records. - CORS validation — Confirm
BACKEND_CORS_ORIGINSincludes the exact Vercel URL withhttps://and no trailing slash. - Health check — Run
curl https://your-backend.up.railway.app/healthto confirm the API is responding.