### Environment Variables Setup Source: https://github.com/ahmedkhaleel2004/gitdiagram/blob/main/README.md Copies the example environment variables file to a new file named '.env'. This file should then be edited with specific API keys and tokens required for the application to run. ```bash cp .env.example .env ``` -------------------------------- ### Install Dependencies Source: https://github.com/ahmedkhaleel2004/gitdiagram/blob/main/README.md Installs project dependencies using pnpm. This command is essential after cloning the repository to ensure all necessary packages are available for development. ```bash pnpm i ``` -------------------------------- ### Start Backend with Docker Source: https://github.com/ahmedkhaleel2004/gitdiagram/blob/main/README.md Starts the backend services using Docker Compose. This command builds the necessary Docker images and runs the backend in detached mode. Logs can be viewed using `docker-compose logs -f`. ```bash docker-compose up --build -d ``` -------------------------------- ### Start Local Database Source: https://github.com/ahmedkhaleel2004/gitdiagram/blob/main/README.md Initializes and starts the local PostgreSQL database. This script makes the executable and prompts the user for confirmation to generate a random password. The database will be accessible at `localhost:5432`. ```bash chmod +x start-database.sh ./start-database.sh ``` -------------------------------- ### Start Frontend Development Server Source: https://github.com/ahmedkhaleel2004/gitdiagram/blob/main/README.md Starts the Next.js frontend development server. This command allows you to view and interact with the GitDiagram application locally, typically accessible at `localhost:3000`. ```bash pnpm dev ``` -------------------------------- ### Backend Prompt Engineering Example Source: https://github.com/ahmedkhaleel2004/gitdiagram/blob/main/README.md Illustrates the location of prompt engineering logic within the backend. This file likely contains the core logic for extracting and analyzing data to generate diagrams. ```python # /backend/app/prompts.py # This file contains the prompt engineering logic for data extraction and analysis. ``` -------------------------------- ### Initialize Database Schema Source: https://github.com/ahmedkhaleel2004/gitdiagram/blob/main/README.md Applies the database schema to the running PostgreSQL instance using Drizzle ORM. This command ensures the database structure is correctly set up for the application. ```bash pnpm db:push ``` -------------------------------- ### Clone Repository Source: https://github.com/ahmedkhaleel2004/gitdiagram/blob/main/README.md Clones the GitDiagram repository from GitHub to your local machine. This is the first step for local development and self-hosting. ```bash git clone https://github.com/ahmedkhaleel2004/gitdiagram.git cd gitdiagram ``` -------------------------------- ### API Rate Limit Configuration Source: https://github.com/ahmedkhaleel2004/gitdiagram/blob/main/README.md Shows where rate limits for diagram generation are defined in the FastAPI backend. Users can modify these limits for local development or self-hosted instances. ```python # backend/app/routers/generate.py # Rate limits are defined in the generate function decorator. # Example: @app.post("/generate", response_model=DiagramResponse) # async def generate( # request: GenerateRequest, # rate_limit: RateLimiter = Depends(get_rate_limiter(limit=1, interval=60)) # ): # ... # Current limits (subject to change): # - 1 request per minute # - 5 requests per day ``` -------------------------------- ### Python Project Dependencies Source: https://github.com/ahmedkhaleel2004/gitdiagram/blob/main/backend/requirements.txt This snippet lists the Python packages and their version constraints as specified for the project. These dependencies cover various aspects of application development, including web frameworks, asynchronous programming, data validation, and utility tools. ```python aiohappyeyeballs==2.4.6 aiohttp==3.11.12 aiosignal==1.3.2 annotated-types==0.7.0 anthropic==0.42.0 anyio==4.7.0 api-analytics==1.2.5 attrs==25.1.0 certifi==2024.12.14 cffi==1.17.1 charset-normalizer==3.4.0 click==8.1.7 cryptography==44.0.0 Deprecated==1.2.15 distro==1.9.0 dnspython==2.7.0 email_validator==2.2.0 fastapi==0.115.6 fastapi-cli==0.0.6 frozenlist==1.5.0 h11==0.14.0 httpcore==1.0.7 httptools==0.6.4 httpx==0.28.1 idna==3.10 Jinja2==3.1.4 jiter==0.8.2 limits==3.14.1 markdown-it-py==3.0.0 MarkupSafe==3.0.2 mdurl==0.1.2 multidict==6.1.0 openai==1.61.1 packaging==24.2 propcache==0.2.1 pycparser==2.22 pydantic==2.10.3 pydantic_core==2.27.1 Pygments==2.18.0 PyJWT==2.10.1 python-dotenv==1.0.1 python-multipart==0.0.19 PyYAML==6.0.2 regex==2024.11.6 requests==2.32.3 rich==13.9.4 rich-toolkit==0.12.0 shellingham==1.5.4 slowapi==0.1.9 sniffio==1.3.1 starlette==0.41.3 tiktoken==0.8.0 tqdm==4.67.1 typer==0.15.1 typing_extensions==4.12.2 urllib3==2.2.3 uvicorn==0.34.0 uvloop==0.21.0 watchfiles==1.0.3 websockets==14.1 wrapt==1.17.0 yarl==1.18.3 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.