Skip to content

stefanbobrowski/upload-center

Repository files navigation

Cloud Playground ☁️ - Upload Center πŸŒ†

A full-stack web application for uploading, analyzing, and managing data using Google Cloud Platform services. Built for scalability, security, and modern DevOps workflows.

πŸ‘‰ React + Vite Frontend
πŸ‘‰ Express + Node.js Backend
πŸ‘‰ Google Cloud Storage, BigQuery, Cloud SQL
πŸ‘‰ Cloud Run deployment with secure Cloud SQL Proxy
πŸ‘‰ Full API security protections (Rate Limiters, CORS, Helmet, IP Logging)


πŸ”— Live Demo

πŸ”— upload-center on Cloud Run


πŸ”  Project Overview

Welcome to the Cloud Playground β€” Upload Center!

Explore hands-on examples to see it in action, showcasing the power of modern backend development, scalable cloud infrastructure, and AI integrations β€” all built on Google Cloud Platform (GCP).

This project demonstrates a secure, production-grade full-stack architecture featuring:

  • Cloud SQL (PostgreSQL): Structured data storage
  • Cloud Run: Dockerized backend + full app delivery
  • Cloud Storage: File uploads (text, images, JSON)
  • BigQuery: Large-scale JSON analysis
  • Vertex AI & Gemini Pro: Text and image understanding

πŸ› οΈ Technology Stack Overview

Layer Technologies Used
Frontend Vite + React (TypeScript, SWC)
Backend Node.js, Express
AI Gemini 1.5 Pro (text + image), Vertex AI
Big Data BigQuery
Database Cloud SQL (PostgreSQL)
Storage Google Cloud Storage
Security IAM, Helmet, CORS, Rate Limiting, reCAPTCHA v3
Build Docker
CI/CD GitHub Actions (Docker build & deploy)
Hosting Cloud Run, Artifact Registry

πŸ” Focus on Security

Built with real-world production security in mind. Heavy focus on securing access and preventing abuse of cloud resources from users and bot traffic. Measures include:

  • Global & route-based API rate limiting
  • reCAPTCHA v3 integration
  • IP logging & strict CORS rules
  • Hardened HTTP headers with Helmet
  • Role-based access controls via Google Cloud IAM

πŸš€ Why It Matters

Upload Center is more than a learning sandbox β€” it's a blueprint for building secure, scalable, cloud-native web applications using today's most powerful tools from Google Cloud. Whether you're testing uploads, analyzing data, or integrating AI, this platform offers a real-world, extensible foundation for modern web development.


πŸ“† Features

  • βœ… Secure PostgreSQL access with Cloud SQL Proxy
  • βœ… Text sentiment analysis with Gemini AI
  • βœ… Upload and analyze images with Gemini AI
  • βœ… Vertex AI text file sentiment analysis
  • βœ… Upload and validate JSON files to Cloud Storage
  • βœ… Load and analyze uploaded files with BigQuery
  • βœ… Rate limiting on all sensitive routes
  • βœ… GitHub Actions CI/CD for Dockerized Cloud Run deployment
  • βœ… Persistent Light/Dark Mode Theme

πŸ“‚ Project Structure

/frontend            # Vite + React frontend
/backend             # Express server + API routes
/backend/db.js       # PostgreSQL connection (via Cloud SQL Proxy)
/backend/routes      # Upload, BigQuery, Sentiment, Image Analysis
/.env                # Environment variables (gitignored)
/.github/workflows/  # GitHub Actions CI/CD workflow files

βš™οΈ Local Development

1. Clone the repo

git clone https://github.com/stefanbobrowski/upload-center.git
cd upload-center

2. Set up backend environment variables

Create backend/.env:

DB_USER=your-db-user
DB_PASSWORD=your-db-password
DB_HOST=your-cloud-sql-ip (or socket path)
DB_NAME=your-db-name
DB_PORT=your-db-port
GOOGLE_APPLICATION_CREDENTIALS=path-to-your-service-account.json
RECAPTCHA_SECRET_KEY=your-recaptcha-key (optional for bot protection)

3. Start the frontend

cd frontend
npm install
npm run dev

4. Start the backend

cd backend
npm install
node server.js

☁️ Cloud Deployment (Cloud Run + Cloud SQL Proxy)

1. Build the frontend

cd frontend
npm run build

2. Docker build & push (CI/CD or manual)

docker build -t gcr.io/YOUR_PROJECT_ID/upload-center .
docker push gcr.io/YOUR_PROJECT_ID/upload-center

3. Set Cloud Run environment variables

DB_USER=your-db-user
DB_PASSWORD=your-password
DB_NAME=your-db-name
DB_PORT=your-db-port
INSTANCE_CONNECTION_NAME=your-project:region:cloudsql-instance
GOOGLE_APPLICATION_CREDENTIALS=inline-json-or-mount-secret
RECAPTCHA_SECRET_KEY=your-recaptcha-key (optional)

4. Deploy via GitHub Actions or gcloud run deploy


πŸ€” Future Work

  • User login / authentication

πŸ‘¨β€πŸ’» Author

Created by @stefanbobrowski Website: https://stefanbobrowski.com


πŸ“„ License

Licensed under the Apache License 2.0.
See LICENSE for full details.


πŸ“ Full Code Repository

Feel free to view the code or contribute with a pull request. You can explore the full source code for Upload Center here: πŸ“ GitHub – Upload Center

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •