Skip to content

0xdaksh-12/FileGo

Repository files navigation

FileGo

React Node.js MongoDB AWS Google Cloud Google OAuth Docker Testing Terraform GitHub Actions

FileGo is a production-grade, high-performance file sharing application built with a focus on security, scalability, and automated infrastructure. This project demonstrates a full-stack deployment on Google Cloud Platform (GCP) using Terraform (IaC) and GitHub Actions (CI/CD).

Production Highlights

  • Multi-Cloud Architecture: Leverages GCP for compute, AWS S3 for storage, and MongoDB Atlas for data.
  • Infrastructure as Code: Entire GCP environment (VMs, Networks, Secrets) provisioned via Terraform.
  • Fully Automated CI/CD: Seamless deployments to production on every push to the deploy branch.
  • Hardened Security: SSL/TLS via Certbot, Nginx reverse proxy, and GCP Secret Manager for sensitive credentials.

Key Features

  • Direct S3 Uploads: Files bypass the server, uploaded directly to S3 via presigned URLs for maximum efficiency.
  • Secure Sharing: Optional password protection and secure download links.
  • Auto-Expiry: Automated background cleanup of expired files based on configurable TTL.
  • Real-time Stats: Comprehensive dashboard with storage usage and download analytics.
  • Robust Auth: Hybrid JWT session management with HTTP-only cookies and Google OAuth integration.

Tech Stack

  • Frontend: React 19, Vite, TanStack Query, Zustand, Tailwind CSS 4, Radix UI.
  • Backend: Node.js 22, Express, Mongoose, Zod, Winston (Professional Logging).
  • Database: MongoDB 7.0 (Replica Set).
  • Storage: AWS S3 (v3 SDK).
  • Infrastructure: Google Cloud Platform (Compute Engine, Secret Manager, VPC).
  • DevOps: Terraform, GitHub Actions, Docker Compose, Nginx.

Production Deployment

This project is designed to be deployed in a professional production environment.

Infrastructure as Code (IaC)

The infrastructure is fully automated using Terraform. It provisions:

  • A secure VPC network and firewall rules.
  • A GCP Compute Engine instance running Docker.
  • GCP Secret Manager for centralized configuration.
  • AWS S3 bucket with automated lifecycle rules.

CI/CD Pipeline

Every push to the main branch runs automated tests, while pushes to the deploy branch trigger a full production deployment via GitHub Actions.

Refer to the Deployment Guide for step-by-step instructions.

Quick Start (Development)

1. Prerequisites

  • Node.js (v22+)
  • Docker & Docker Compose
  • AWS S3 Bucket

2. Setup

make install
cp server/.env.example server/.env
# Configure your secrets in server/.env

3. Running Locally

make dev

Architecture

Detailed architectural diagrams and data flows can be found in docs/ARCHITECTURE.md.

Testing

The project is backed by a comprehensive suite of 39 automated tests (Unit, Integration, and E2E).

make test

License

Licensed under the Apache License 2.0.