| Service | Purpose |
|---|---|
| React | Frontend framework |
| Node.js / Express | Backend API |
| PostgreSQL | Database |
| Render | Hosting (frontend + backend + database) |
| Stripe | Payment processing |
| Resend | Transactional emails |
| Cloudflare | DNS management, image hosting |
| Namecheap | Domain registration |
maldevera_com/
├── frontend/ # React app
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── context/ # React context providers
│ │ └── hooks/ # Custom hooks
│ └── package.json
├── backend/ # Express API
│ ├── routes/ # API endpoints
│ ├── models/ # Sequelize models
│ ├── config/ # Database config
│ └── package.json
└── docker-compose.yml # Local Docker setup (optional)
- Node.js 18+
- PostgreSQL (via Postgres.app or Docker)
- Stripe CLI (for webhook testing)
-
Clone and install dependencies:
cd frontend && npm install cd ../backend && npm install
-
Set up environment variables:
# backend/.env STRIPE_SECRET_KEY=sk_test_... STRIPE_WEBHOOK_SECRET=whsec_... # From `stripe listen` DB_USERNAME=your_user DB_PASSWORD=your_password DB_NAME=maldevera_merch_inventory DB_HOST=localhost JWT_SECRET=your_secret FRONTEND_URL=http://localhost:3000 RESEND_API_KEY=re_...
# frontend/.env REACT_APP_BACKEND_URL=http://localhost:5001 -
Start the database (Postgres.app or Docker)
-
Run migrations:
cd backend npx sequelize-cli db:migrate npx sequelize-cli db:seed:all -
Start the servers:
# Terminal 1 - Backend cd backend && npm start # Terminal 2 - Frontend cd frontend && npm start
-
For Stripe webhook testing:
stripe login stripe listen --forward-to localhost:5001/api/webhooks
| Variable | Description |
|---|---|
STRIPE_SECRET_KEY |
Stripe API key (live or test) |
STRIPE_WEBHOOK_SECRET |
Stripe webhook signing secret |
DB_HOST |
PostgreSQL host |
DB_NAME |
Database name |
DB_USERNAME |
Database user |
DB_PASSWORD |
Database password |
JWT_SECRET |
Secret for JWT tokens |
FRONTEND_URL |
Frontend URL for CORS |
RESEND_API_KEY |
Resend API key for emails |
NODE_ENV |
Environment (production/development) |
PORT |
Server port |
| Variable | Description |
|---|---|
REACT_APP_BACKEND_URL |
Backend API URL |