Skip to content

AleHS01/gitdocsify-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitDocsify Extension βœ¨πŸš€

AI-powered browser extension to elevate README files into professional-grade, user-friendly documentation for your GitHub projects. πŸ“š

Note

This browser extension is currently under development

Table of Contents

  1. Tech Stack πŸ› οΈ
  2. Other Libraries & Dependencies πŸ“š
  3. Prerequisites βœ…
  4. Setup βš™οΈ
  5. File Structure πŸ—

Tech Stack πŸ› οΈ

Frontend πŸ’»

React Vite TypeScript

Backend βš™οΈ

Python Supabase FastAPI GitHub Poetry

Other Libraries & Dependencies πŸ“š

  • @primer/react
  • Uvicorn

Prerequisites βœ…

Install brew. Install anything below brew, through brew.

Installation Process πŸ“¦

Install brew

bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Python

brew install python

Install Node.js

brew install node

Check docker Version

docker --version

Check Python 3 and Pip Version

python3 --version
pip3 --version

Check Node.js Version

node --version

Setup βš™οΈ

  • Clone the repository:
git clone https://github.com/AleHS01/gitdocsify-extension.git
cd gitdocsify-extension

Docker Setup 🐳

To run the entire project with Docker, follow these steps:
  1. Make sure you have Docker installed:

  2. Build the containers:

docker compose build
  1. Start the containers:
docker compose up
  • Both the frontend and backend services are going to be running:
    • Frontend will be accessible at http://localhost:5173
    • Backend will be accessibl at http://localhost:8000
  1. Stop the containers:
docker compose down

Important

Docker automatically builds the containers and sets up the environment for both the frontend and backend, eliminating the need for manual setup.

If you prefer to manually set up the frontend or backend, follow the steps below:

Frontend Setup & App Run πŸš€

  1. Navigate to the frontend directory
cd frontend
  1. Install Node dependencies
npm install
  1. Copy the .env.example file to .env:
cp .env.example .env
  1. Update the .env file with your environment variables:
VITE_SUPABASE_URL= your_supabase_url
VITE_SUPABASE_KEY= your_supabase_key
VITE_FRONTEND_URl= your_frontend_local_url or your_frontend_production_url
  1. Run Vite development server
npm run dev
  1. React app at: http://localhost:5173/

Backend Setup & Server Run 🌐

  1. Install Poetry (Python package manager):
# Using pip3
pip3 install poetry
# Or using Homebrew
brew install poetry
  1. Navigate to the backend directory from gitdocsify-extension directory
cd backend
  1. Install dependecies Python using Poetry
poetry install
  1. Copy the .env.example file to .env:
cp .env.example .env
  1. Update the .env file with your environment variables:
SUPABASE_URL= your_supabase_url
SUPABASE_KEY= your_supabase_key
PYTHON_ENV= production or development
  1. Run the FastAPI app using Uvicorn
# Navigate to directory where main.py is located
cd src/app

# Run FastAPI server with auto reload when changes are saved
uvicorn main:app --reload
  1. FastAPI backend server at http://localhost:8000.

πŸ— File Structure

/gitdocsify-extension
β”‚
β”œβ”€β”€ /backend                       # Backend application (FastAPI)
β”‚   β”œβ”€β”€ poetry.lock               # Poetry lock file (dependency versions)
β”‚   β”œβ”€β”€ pyproject.toml            # Poetry project configuration
β”‚   β”œβ”€β”€ .env                      # Enviromental Variables
β”‚   β”œβ”€β”€ dockerfile                # Backend container image
β”‚   β”œβ”€β”€ /src                       # Source code for the backend
β”‚   β”‚   └── /app                   # Main backend app directory
β”‚   β”‚       β”œβ”€β”€ __init__.py       # Initializes the app module
β”‚   β”‚       β”œβ”€β”€ /api               # API-related code
β”‚   β”‚       β”‚   └── __init__.py   # Initializes the API module
β”‚   β”‚       β”œβ”€β”€ /core              # Core functionalities, e.g., database or service connections
β”‚   β”‚       β”‚   └── supabase.py   # Supabase-related functionality
β”‚   β”‚       β”œβ”€β”€ main.py           # FastAPI app instance
β”‚   β”‚       β”œβ”€β”€ /models            # Models for database interactions
β”‚   β”‚       └── /schemas           # Pydantic schemas for validation
β”‚   └── /test                      # Tests for the backend
β”‚       └── __init__.py           # Initializes test module
β”‚
β”œβ”€β”€ /frontend                      # Frontend application (React with Vite)
β”‚    β”œβ”€β”€ /build                     # Build output directory (generated on build)
β”‚    β”‚   β”œβ”€β”€ assets                # Static assets (e.g., JS and CSS files)
β”‚    β”‚   β”œβ”€β”€ index.html            # Entry HTML file for the frontend
β”‚    β”‚   β”œβ”€β”€ manifest.json         # Metadata for PWA setup & Extension configuration
β”‚    β”œβ”€β”€ eslint.config.js           # ESLint configuration file
β”‚    β”œβ”€β”€ index.html                # HTML entry file for the frontend
β”‚    β”œβ”€β”€ .env                      # Enviromental Variables
β”‚    β”œβ”€β”€ dockerfile                # Frontend container image
β”‚    β”œβ”€β”€ package-lock.json         # Lock file for npm dependencies
β”‚    β”œβ”€β”€ package.json              # Package configuration for the frontend
β”‚    β”œβ”€β”€ /public                    # Public directory (assets and metadata)
β”‚    β”‚   β”œβ”€β”€ manifest.json         # Manifest for the frontend app (PWA setup) & Extension configuration
β”‚    β”œβ”€β”€ /src                        # Source code for the frontend
β”‚    β”‚   β”œβ”€β”€ App.css               # Main CSS file for the React app
β”‚    β”‚   β”œβ”€β”€ App.tsx               # Main React component (App)
β”‚    β”‚   β”œβ”€β”€ /assets                # Static assets for the app
β”‚    β”‚   β”œβ”€β”€ /components            # Reusable UI components
β”‚    β”‚   β”‚   └── ColorModeSwitcher.tsx # Component for theme switching
β”‚    β”‚   β”œβ”€β”€ /context               # React Context for app-wide state
β”‚    β”‚   β”‚   └── UserContext.tsx    # User context for managing user state
β”‚    β”‚   β”œβ”€β”€ index.css             # Global CSS file
β”‚    β”‚   β”œβ”€β”€ /lib                   # Utility functions or libraries
β”‚    β”‚   β”‚   └── supabase.ts        # Supabase-related utilities
β”‚    β”‚   β”œβ”€β”€ main.tsx              # Main entry file for React app
β”‚    β”‚   β”œβ”€β”€ /pages                 # Page components (views)
β”‚    β”‚   β”‚   └── Login.tsx         # Login page component
β”‚    β”‚   β”‚   └── Dashboard.tsx         # User Dashboard page
β”‚    β”‚   β”‚   └── LoginScreen.tsx         # Loading component
β”‚    β”‚   β”œβ”€β”€ /types                 # TypeScript types for the app
β”‚    β”‚   β”‚   └── user.ts           # User type definition
β”‚    β”‚   β”œβ”€β”€ /utils                 # TypeScript types for the app
β”‚    β”‚   β”‚   └── ProtectedRoutes.tsx  # Protected Routes Wrapper
β”‚    └── vite.config.ts            # Vite configuration file for bundling
β”œβ”€β”€ docker-compose.yml             #Multi-container Docker setup
β”œβ”€β”€ .dockerignore                 # Excluded files from Docker
β”œβ”€β”€ README.md                    # Project documentation (root level)
└── .gitignore                   # Git ignore file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published