A mobile-friendly business introduction website built with Vue.js 3 frontend and Flask backend, deployed on Google Cloud Run.
gsf-web/
├── frontend/ # Vue.js 3 frontend application
├── backend/ # Flask backend API
├── database/ # Skeema database migration files
├── instance/ # Local scripts, credentials, keys (git-ignored)
└── LICENSE # Apache 2.0 License
- Frontend: Vue.js 3, Vite, Vue Router, Axios
- Backend: Flask, SQLAlchemy, PyMySQL
- Database: MySQL
- Migrations: Skeema
- Deployment: Google Cloud Run
- Containerization: Docker
- Node.js 20+ and npm
- Python 3.11+
- MySQL 8.0+
- Skeema (for database migrations) - Installation Guide
- Google Cloud SDK (for deployment)
- Navigate to the backend directory:
cd backend- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create a
.envfile (copy from.env.exampleif available) with your MySQL credentials:
SECRET_KEY=your-secret-key-here
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=your-password
MYSQL_DATABASE=gsf_web
- Create the MySQL database:
CREATE DATABASE gsf_web;- Set up database schema using Skeema:
cd database
./skeema.sh init
# Edit schema files in database/schema/ as needed
./skeema.sh push- Run the Flask application:
python app.pyThe backend will be available at http://localhost:5000
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Create a
.envfile (optional, defaults to/api):
VITE_API_BASE_URL=http://localhost:5000/api
- Run the development server:
npm run devThe frontend will be available at http://localhost:3000
cd frontend
npm run buildThe backend is ready for production deployment with gunicorn.
- Google Cloud Project created
- Cloud SQL MySQL instance set up (or use Cloud SQL connection)
- Google Cloud SDK installed and authenticated
- Update the
deploy.shscript with your project ID - Set up Cloud SQL connection or update environment variables
- Run:
cd backend
./deploy.sh YOUR_PROJECT_ID- Update the
deploy.shscript with your project ID and backend URL - Run:
cd frontend
./deploy-frontend.sh YOUR_PROJECT_ID https://YOUR_BACKEND_URLYou can also use the Cloud Run YAML files:
# Backend
gcloud run services replace backend/cloud-run.yaml
# Frontend
gcloud run services replace frontend/cloud-run.yamlSECRET_KEY: Flask secret key for sessionsMYSQL_HOST: MySQL host addressMYSQL_PORT: MySQL port (default: 3306)MYSQL_USER: MySQL usernameMYSQL_PASSWORD: MySQL passwordMYSQL_DATABASE: MySQL database namePORT: Port for the application (set by Cloud Run)
VITE_API_BASE_URL: Backend API base URL
This project uses Skeema for database schema management and migrations.
Download Skeema from https://www.skeema.io/download/ and add it to your PATH.
-
Initialize Skeema (first time setup):
cd database ./skeema.sh init -
Define your schema in SQL files under
database/schema/:- Edit
database/schema/base.sqlor create new.sqlfiles - Define tables, indexes, foreign keys, etc.
- Edit
-
Check differences before applying:
./skeema.sh diff
-
Apply schema changes to database:
./skeema.sh push
-
Pull current schema from database (if schema exists):
./skeema.sh pull
Configuration is stored in database/.skeema. Update it with your database connection details:
host=localhost
port=3306
user=root
password=your-password
default-schema=gsf_webWhen connecting to Cloud SQL, update database/.skeema with SSL configuration:
ssl-mode=REQUIRED
ssl-ca=/path/to/server-ca.pem
ssl-cert=/path/to/client-cert.pem
ssl-key=/path/to/client-key.pem- Always review
skeema diffoutput before runningskeema push - Commit schema files to version control
- Use descriptive file names in
database/schema/for organization - Test migrations on a development database first
For more information, see the Skeema documentation.
The instance/ folder is git-ignored and can be used for:
- Local configuration files
- Credentials and API keys
- Local development scripts
- Development-only files
This folder will not be committed to version control, making it safe for storing sensitive information and local-only files.
- Responsive design with mobile-first approach
- Touch-friendly UI elements
- Optimized viewport settings
- Fast loading with code splitting
- Progressive Web App ready (can be extended)
GET /api/health- Health check endpointGET /api/test- Test endpoint
Add your business-specific endpoints in backend/routes.py
Apache License 2.0 - See LICENSE file for details
- Create a feature branch
- Make your changes
- Test locally
- Submit a pull request
For questions or issues, please open an issue in the repository.