This project is a full-featured fullstack web application designed for file sharing with friends on events like weddings or parties. It leverages Google Cloud for a serverless architecture, using Terraform for infrastructure management, Go and Python for the backend, and Flutter for the frontend.
- Backend: Contains all server-side logic divided into functions, database management scripts, and Terraform configuration files for deploying to Google Cloud.
- Frontend: Flutter-based UI components for a responsive web and mobile experience.
- Functions: Serverless functions to handle operations like file uploads/downloads, user management, and session handling.
- Database: Scripts for database setup, state management, and trigger setups.
- Terraform: Infrastructure as Code files to manage resources on Google Cloud Platform.
- Flutter App: A cross-platform application providing a user-friendly interface for interacting with the backend services.
- Google Cloud Account
- Terraform installed
- Flutter SDK
- Go and Python environments set up
- Create a new project in Google Cloud Platform
- Authorize the Google Cloud SDK
gcloud auth login (on machines without a browser the --no-browser flag can be used)
- Select the project in the Google Cloud SDK
gcloud config set project <project-id>
-
Create a new service account and download the key file create-gcloud-credentials.sh) (ensure you have the necessary permissions on the google cloud)
-
Tweak the terraform variables.tf file to match your project id and service account key file path
-
Prepare terraform for migrating the backend to google cloud You will need to disable the "gcs" backend in the terraform_backend.tf file (comment it out), run
terraform init
once, and then uncomment it, so we can migrate the backend from local to gcloud -
Create a Google Cloud Bucket for the terraform state
cd backend/terraform
./migrate_backend_to_gcloud.sh
- Deploy the infrastructure using terraform:
cd backend/terraform
terraform init
terraform apply
- Flutter Setup:
- Navigate to the
frontend
directory. - Run
flutter pub get
to install dependencies. - Start the application with
flutter run
.
- Navigate to the
- The web application allows users to securely share files with their friends.
- Functions like file upload/download, session management, and user creation/deletion are handled through the serverless backend.
- There is currently no in-app ordering method, so "sessions" are created manually through the "create_order" function, followed by a call to "auto-sessions" to automatically create and destroy the sessions
Contributions are welcome. Please fork the project and submit a pull request with your changes.