Logo Lanfrica

niyibizisteven13-ux/esoko-platform

Domaine:

digital infrastructure

Type de record:

software
Créateur:
niy
Hôte:
The all-in-one platform for digital payments, inventory management, and reporting in Rwanda. Inclusive for smartphones and feature phones. # Run and deploy your AI Studio app This contains everything you need to run your app locally. View your app in AI Studio: ai.studio ## Run Locally **Prerequisites:** Node.js 1. Install dependencies: `npm install` 2. Copy `.env.example` to `.env` and fill in your actual values 3. Run the app: `npm run dev` ## Production Deployment (Render) ### Prerequisites - Render account - Firebase project with Firestore enabled - Stripe account - Gmail account with App Passwords enabled ### Steps 1. **Prepare your repository:** - Ensure `service-account.json` is NOT committed (it's in .gitignore) - Copy `.env.example` to `.env` locally for testing 2. **Deploy to Render:** - Connect your GitHub repository to Render - Create a new Web Service - Set build settings: - **Runtime:** Node.js - **Build Command:** `npm run build` - **Start Command:** `npm start` 3. **Configure Environment Variables in Render:** Set these in your Render service's Environment settings: ``` NODE_ENV=production FIREBASE_SERVICE_ACCOUNT= GEMINI_API_KEY= APP_URL=your-app-name.onrender.com SMTP_USER= SMTP_PASS= STRIPE_SECRET_KEY= STRIPE_WEBHOOK_SECRET= STRIPE_PRICE_ID_PREMIUM= ``` 4. **Firebase Setup:** - Enable Firestore in your Firebase project - Create a service account and download the JSON key - Use the JSON content as the `FIREBASE_SERVICE_ACCOUNT` env var 5. **Stripe Setup:** - Create products and prices in Stripe dashboard - Set up webhooks pointing to `your-app.onrender.com` - Copy the webhook secret 6. **Deploy:** - Push your changes to GitHub - Render will automatically build and deploy ### Security Notes - Never commit `.env` files or `service-account.json` to version control - Use environment variables for all secrets in production - Regularly rotate API keys and service account credentials