Skip to content

GovindSingh3011/SourceToLive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

158 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SourceToLive Logo

License Version Node version Status

A Git-to-Live Deployment Platform Transform GitHub repositories into managed projects with one-click deployment

Features β€’ Quick Start β€’ Documentation β€’ Contributing


SourceToLive is a Git-to-live deployment platform that transforms connected GitHub repositories into managed projects with one-click deployment. Turn your code into a live application in three simple steps: connect a repository, configure your build, and deploy.

πŸš€ Features

  • πŸš€ One-Click Deployment – Deploy from GitHub in three steps
  • πŸ“Š Live Build Logs – Real-time build progress streaming
  • πŸ”„ Automatic Deployments – GitHub webhook auto-redeploy
  • βš™οΈ Build Configuration – Customize install & build commands
  • πŸ” Environment Variables – Secure project configuration
  • πŸ“± Project Management – Dashboard with search & control
  • πŸ”— GitHub Integration – OAuth auth & repository access
  • 🌐 Deployment URLs – Custom URLs per project
  • πŸ‘€ User Profiles – GitHub connection & account management
  • πŸ“š In-App Docs – API & app documentation in UI
  • πŸ“² Responsive Design – Desktop & mobile support
  • ⚑ Real-time Streaming – Live log updates
  • πŸ›‘οΈ Secure Auth – JWT + OAuth 2.0 support
  • πŸ“§ Email Notifications – OTP & deployment alerts
  • 🌍 Multi-environment – Dev, staging, production ready

πŸ“‹ Project Structure

 SourceToLive/
 β”œβ”€β”€ πŸ“ Backend-Server/          # Node.js/Express API server
 β”‚   β”œβ”€β”€ config/                 # Configuration management
 β”‚   β”œβ”€β”€ controllers/            # Request handlers
 β”‚   β”œβ”€β”€ middleware/             # Auth & verification middleware
 β”‚   β”œβ”€β”€ models/                 # MongoDB schemas
 β”‚   β”œβ”€β”€ routes/                 # API route definitions
 β”‚   β”œβ”€β”€ utils/                  # Helper functions
 β”‚   β”œβ”€β”€ index.js                # Express app entry point
 β”‚   β”œβ”€β”€ cloudflared-config.yml
 β”‚   β”œβ”€β”€ package.json
 β”‚   └── TUNNEL_SETUP.md
 β”‚
 β”œβ”€β”€ πŸ“ Build-Server/            # Docker containerized build environment
 β”‚   β”œβ”€β”€ Dockerfile              # Container definition
 β”‚   β”œβ”€β”€ main.sh                 # Build orchestration script
 β”‚   β”œβ”€β”€ script.js               # Build execution logic
 β”‚   └── package.json
 β”‚
 β”œβ”€β”€ πŸ“ client/                  # React frontend (Vite)
 β”‚   β”œβ”€β”€ src/
 β”‚   β”‚   β”œβ”€β”€ components/         # Reusable React components
 β”‚   β”‚   β”œβ”€β”€ pages/              # Page-level components
 β”‚   β”‚   β”œβ”€β”€ App.jsx             # Main app file
 β”‚   β”‚   β”œβ”€β”€ index.css           # Global styles
 β”‚   β”‚   └── main.jsx            # React entry point
 β”‚   β”œβ”€β”€ public/                 # Static assets
 β”‚   β”œβ”€β”€ vite.config.js
 β”‚   β”œβ”€β”€ eslint.config.js
 β”‚   └── package.json
 β”‚
 β”œβ”€β”€ πŸ“ Reverse-Proxy/           # EC2-based reverse proxy for deployed apps
 β”‚   β”œβ”€β”€ index.js                # Proxy server logic
 β”‚   β”œβ”€β”€ package.json
 β”‚   └── 404.html
 β”‚
 β”œβ”€β”€ πŸ“ Docs/                    # Documentation
 β”‚   β”œβ”€β”€ images/                 # Architecture diagrams and visuals
 β”‚   β”‚   └── SystemArchitecture.png
 β”‚   β”œβ”€β”€ APP_DOCUMENTATION.md
 β”‚   β”œβ”€β”€ API_DOCUMENTATION.md
 β”‚   └── AWS_CONFIGURATION.md
 β”‚
 └── README.md

πŸ› οΈ Tech Stack

Frontend Backend Infrastructure
  • React 19 – Modern UI rendering
  • Vite – Next-gen build tool
  • React Router v7 – Client-side routing
  • Tailwind CSS – Utility-first CSS
  • React Markdown – Markdown rendering
  • Google OAuth – Third-party auth
  • Node.js + Express – REST API
  • MongoDB Atlas – Document DB
  • JWT – Stateless authentication
  • AWS SDK – Cloud integration
  • GitHub OAuth 2.0 – OAuth provider
  • Nodemailer + Resend – Email
  • Bcrypt – Password hashing
  • AWS ECS (Fargate) – Serverless compute
  • AWS CloudWatch – Log management
  • AWS S3 – File storage
  • AWS EC2 – Reverse proxy
  • Docker – Containerization
  • GitHub API – Repository management
  • Cloudflare Tunnel – Secure access

Build System & Additional Tools

  • Docker – Containerized build environment
  • Morgan – HTTP request logging
  • CORS – Cross-origin request handling

πŸ“¦ Installation & Setup

Prerequisites

Required Version Link
Node.js β‰₯ 18 Download
npm or yarn Latest Comes with Node.js
MongoDB Atlas Cloud Sign up
AWS Account Free Tier eligible Create account
GitHub OAuth App Free Setup guide

Quick Start with Docker (Recommended)

Fastest way to get started – All services run with one command

git clone https://github.com/GovindSingh3011/SourceToLive.git
cd SourceToLive
docker-compose up

Frontend: http://localhost:5173 Backend: http://localhost:3000 Reverse Proxy: http://localhost:8000


Manual Setup

Important Setup Note

Use the AWS Configuration Guide while completing the manual setup below. It is the source of truth for ECS, S3, IAM, CloudWatch, and proxy-related values.

AWS Area What to Check
Backend Server CLUSTER, TASK, AWS_SUBNETS, AWS_SECURITY_GROUPS, S3_BUCKET
Build Server AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION
Reverse Proxy PORT, BASE_PATH, AWS credentials, AWS_REGION

1️⃣ Backend Server Setup

cd Backend-Server
npm install

Create .env file in Backend-Server/:

# πŸ“‹ Server Configuration
PORT=3000
NODE_ENV=production
APP_DOMAIN=sourcetolive.app

# ☁️ AWS Configuration
AWS_REGION=us-east-1
CLUSTER=<your-ecs-cluster>
TASK=<your-ecs-task>
AWS_SUBNETS=<comma-separated-subnet-ids>
AWS_SECURITY_GROUPS=<comma-separated-security-group-ids>
S3_BUCKET=<your-s3-bucket>
AWS_ACCESS_KEY_ID=<your-access-key>
AWS_SECRET_ACCESS_KEY=<your-secret-key>

# πŸ—„οΈ Database
MONGODB_URI=<your-mongodb-connection-string>

# πŸ” Authentication
JWT_SECRET=<strong-random-secret>

# πŸ“§ Email Configuration
EMAIL_SERVICE=gmail
EMAIL_USER=<your-email>
EMAIL_PASSWORD=<gmail-app-password>
EMAIL_FROM=<sender-name>

# 🌐 OAuth Configuration
GOOGLE_CLIENT_ID=<your-google-client-id>
GITHUB_CLIENT_ID=<your-github-client-id>
GITHUB_CLIENT_SECRET=<your-github-secret>
GITHUB_CALLBACK_URL=https://yourdomain.com/auth/github/callback

# πŸ”— CORS & URLs
CORS_ORIGIN=https://sourcetolive.dev
FRONTEND_URL=https://sourcetolive.dev
API_URL=https://api.sourcetolive.dev

Start the backend:

npm run dev          # Development
npm start            # Production

βœ… Backend: http://localhost:3000


2️⃣ Frontend Setup

cd client
npm install

Create .env file in client/:

# πŸ”Œ API Configuration
VITE_API_URL=http://localhost:3000          # Backend API URL

# 🌐 OAuth Configuration
VITE_GOOGLE_CLIENT_ID=<your-google-client-id>
VITE_GITHUB_CLIENT_ID=<your-github-client-id>
VITE_GITHUB_REDIRECT_URI=http://localhost:5173/auth/github/callback

Start the dev server:

npm run dev

βœ… Frontend: http://localhost:5173


3️⃣ Build Server Setup (Optional)

cd Build-Server
npm install
docker build -t sourcetolive-build .

Create .env file in Build-Server/:

# ☁️ AWS Credentials
AWS_ACCESS_KEY_ID=<your-access-key>
AWS_SECRET_ACCESS_KEY=<your-secret-key>
AWS_REGION=us-east-1

4️⃣ Reverse Proxy Setup (Optional)

cd Reverse-Proxy
npm install

Create .env file in Reverse-Proxy/:

# πŸš€ Application Settings
PORT=8000
BASE_PATH=https://sourcetolivebucket.s3.us-east-1.amazonaws.com/__outputs

# ☁️ AWS Credentials
AWS_ACCESS_KEY_ID=<your-access-key>
AWS_SECRET_ACCESS_KEY=<your-secret-key>
AWS_REGION=us-east-1

Start the server:

npm run dev

βœ… Reverse Proxy: http://localhost:8000


πŸ”Œ API Routes

πŸ” Authentication Routes

Method Endpoint Description
POST /api/auth/register Register new user
POST /api/auth/register/verify Verify OTP & complete signup
POST /api/auth/login Login with credentials
POST /api/auth/google Google OAuth login
GET /api/auth/github/oauth Initiate GitHub OAuth
GET /api/auth/github/callback GitHub OAuth callback
GET /api/auth/me Get current user info
POST /api/auth/github-token Save GitHub token
GET /api/auth/github-token/status Check GitHub connection
DELETE /api/auth/github-token Disconnect GitHub

πŸ“¦ Project Routes

Method Endpoint Description
GET /api/project List all user projects
POST /api/project Create new project
GET /api/project/:projectId Get project details
PUT /api/project/:projectId Update project config
DELETE /api/project/:projectId Delete project
GET /api/project/:projectId/logs/stream Live build logs (EventSource)
GET /api/project/:projectId/logs/archive Get archived logs
POST /api/project/:projectId/redeploy Trigger manual redeploy
GET /api/project/repositories/github Fetch GitHub repositories

πŸ”— Webhook Routes

Method Endpoint Description
POST /api/webhook/github/:projectId GitHub webhook trigger
POST /api/webhook/gitlab/:projectId GitLab webhook trigger
POST /api/webhook/enable/:projectId Enable auto-redeploy
POST /api/webhook/disable/:projectId Disable auto-redeploy
GET /api/webhook/status/:projectId Get webhook status

🌐 Frontend Routes

Route Purpose
/ Home / Landing page
/login User login
/signup User registration with OTP
/dashboard Projects dashboard
/create-project 3-step deployment wizard
/project/:projectId Project detail & logs
/project/:projectId/settings Project configuration
/profile User account & GitHub settings
/about About and team page
/api-docs API documentation
/app-docs App documentation

πŸ—οΈ System Architecture

SourceToLive operates as a distributed deployment platform with the following components working in harmony:

SourceToLive System Architecture Diagram

How it works:

  • GitHub triggers a webhook when code is pushed
  • Backend Server receives the event and validates the repository
  • Build Servers (ECS Fargate) compile and build the project in parallel containers
  • Log Server (CloudWatch) streams real-time build logs to the dashboard
  • S3 Bucket stores the compiled output in project directories
  • Reverse Proxy routes incoming requests to the live deployment
  • Frontend monitors progress and displays logs to the user

Architecture Components

Component Role Technology
GitHub Source control & webhooks GitHub API + OAuth 2.0
Backend Server API & orchestration Node.js + Express + MongoDB
Build Servers Multi-process compilation AWS ECS Fargate + Docker
Log Server Real-time log streaming CloudWatch + Node.js
S3 Storage Build output storage AWS S3 + CloudFront
Reverse Proxy URL routing & delivery AWS EC2 + Node.js
Frontend User dashboard & monitoring React 19 + Vite + Tailwind

πŸ” Authentication

JWT Bearer Token

All protected API endpoints require this header:

Authorization: Bearer <jwt_token>

Supported Authentication Methods

Method Use Case Setup
Email + Password Traditional signup/login Requires JWT secret
Google OAuth Quick sign-up with Google Needs Google Client ID
GitHub OAuth Repository access & webhooks Needs GitHub Client ID & Secret

Session Management

  • πŸ“± Token stored in browser localStorage as token
  • πŸ”’ Protected routes redirect to /login if unauthenticated
  • ⏱️ Token expiration enforced; no automatic refresh

πŸš€ Deployment Lifecycle

Step-by-Step Flow

1️⃣ User Creates Project
   ↓
2️⃣ Backend Validates Repo
   ↓
3️⃣ ECS Build Task Queued
   ↓
4️⃣ Build Execution (Docker Container)
   ↓
5️⃣ Live Log Streaming via CloudWatch
   ↓
6️⃣ S3 Upload (Build Output)
   ↓
7️⃣ URL Activation
   ↓
8️⃣ Dashboard Update

Deployment States

State Meaning
queued Waiting for build to start
running Build in progress (logs streaming)
finished Build completed, deployment live βœ…
failed Build failed (check logs for errors) ❌

πŸ“Š Database Schema

User Model

{
  _id: ObjectId,
  email: String (unique),
  password: String (bcrypt hashed),
  displayName: String,
  avatar: String (URL),
  githubToken: String (encrypted),
  isVerified: Boolean,
  createdAt: Date,
  updatedAt: Date
}

Project Model

{
  _id: ObjectId,
  projectId: String (unique per user),
  name: String,
  repositoryUrl: String,
  branch: String (default: 'main'),
  installCommand: String (e.g., 'npm install'),
  buildCommand: String (e.g., 'npm run build'),
  buildOutputDirectory: String (e.g., 'dist/'),
  environmentVariables: Object, // key-value pairs
  owner: { userId: ObjectId },
  status: String ('queued' | 'running' | 'finished' | 'failed'),
  deploymentUrl: String (auto-generated),
  deploymentTimestamps: {
    created: Date,
    started: Date,
    completed: Date
  },
  webhookEnabled: Boolean,
  webhookId: String,
  createdAt: Date,
  updatedAt: Date
}

πŸ§ͺ Development

Running All Services Locally

# Terminal 1 - Backend API
cd Backend-Server
npm run dev

# Terminal 2 - Frontend (another terminal)
cd client
npm run dev

# Terminal 3 - Reverse Proxy (optional)
cd Reverse-Proxy
npm run dev

After startup, access:

Building for Production

Frontend:

cd client
npm run build    # Output: dist/
npm run preview  # Preview production build

Backend:

  • No build needed; runs Node.js directly

Code Quality & Linting

Frontend:

cd client
npm run lint     # Run ESLint
npm run lint:fix # Fix lint issues

πŸ“š Documentation

Browse documentation directly in the app at /api-docs and /app-docs.


🀝 Contributing

We welcome contributions! Follow these steps to contribute:

1. Fork & Clone

git clone https://github.com/GovindSingh3011/SourceToLive.git
cd SourceToLive
git checkout -b feature/your-feature

2. Make Changes & Commit

Make your changes and commit using conventional commit format:

git commit -m "feat(scope): description of your feature"

3. Push & Create PR

git push origin feature/your-feature

Then open a Pull Request on GitHub with a clear description of your changes.

Commit Message Guidelines

Follow Conventional Commits format:

<type>(<scope>): <subject>

- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- style: Code style (no logic changes)
- refactor: Code refactoring
- test: Adding or updating tests
- chore: Build, dependencies, tooling

Examples:

feat(auth): add GitHub OAuth login
fix(dashboard): resolve project search filtering
docs: update API documentation
refactor(api): simplify error handling

πŸ“‹ Roadmap

Current Limitations ⚠️

  • ❌ No rollback to previous deployments
  • ❌ Single deployment per project (overwrites on redeploy)
  • ❌ No team collaboration or shared projects
  • ❌ No build caching or optimization
  • ❌ No custom domains (CNAME support)
  • ❌ No advanced monitoring or metrics

Planned Features πŸš€

Feature Status Priority
Deployment Rollback Planned High
Team Collaboration Planned High
Build Caching Planned Medium
Custom Domain Support Planned Medium
Advanced Monitoring & Alerts Planned Medium
Email Notifications Planned Medium
Staging Environments Planned Low
AI-Powered Platform Guidance (RAG) Planned Low

πŸ”’ Security & Privacy

Security Measures

Feature Implementation
Passwords Hashed with bcrypt (salt rounds: 10)
Tokens JWT encrypted at rest and in transit
GitHub Tokens Encrypted in MongoDB before storage
Environment Variables Secure storage (TODO: add encryption at rest)
CORS Origin validation on all cross-origin requests
HTTPS/TLS All production connections encrypted
Input Validation All user inputs validated before processing
XSS Protection Content security policy headers

Best Practices for Users

  • βœ… Use strong, unique passwords
  • βœ… Enable 2FA on GitHub and connected accounts
  • βœ… Regularly rotate access tokens
  • βœ… Use HTTPS in production
  • βœ… Keep dependencies updated
  • βœ… Review environment variables permissions

πŸ‘₯ Team

SourceToLive is developed by a team of developers focused on implementing real-world deployment workflows, cloud infrastructure, and scalable application delivery while continuously learning and evolving.

Contributor LinkedIn GitHub Profile
Govind Singh LinkedIn @GovindSingh3011
Soumya Kumar Gupta LinkedIn @soumyakumargupta
Vansh Agarwal LinkedIn @Vanshagarwl
Aviral Mishra LinkedIn @AVIRALMISHRA1
Akshat Kushwaha LinkedIn @akshatkushwaha03
Jatin Kumar LinkedIn @Jatin-kumarx

βš–οΈ Legal Notice

This repository is intended for learning, reference, and non-commercial exploration.
Unauthorized commercial usage, reproduction, or deployment of this project is not permitted without prior authorization.

πŸ“„ License

This project is licensed under the SourceToLive Custom License.
Usage for commercial purposes requires prior permission from the Primary Developer.


πŸ“ž Support & Feedback

Getting Help

Contributing

Found a bug? Want to add a feature? Contributions are welcome! See Contributing section above for guidelines.


⭐ If you find SourceToLive helpful, please give us a star!

Deploy your code with confidence. SourceToLive makes it simple.

Last Updated: April 9, 2026 Version: 1.0 Status: Production Ready βœ…


Β© 2026 SourceToLive. All rights reserved.

Back to top

About

SourceToLive is a Git-to-live deployment platform that turns GitHub repositories into managed live apps with one-click deploys, live build logs, and auto-redeploy via webhooks.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages