Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Ignore VS Code settings
.vscode/
# Logs
logs
*.log
Expand Down Expand Up @@ -35,4 +37,11 @@ venv/
env/
ENV/
venv.bak/
pycache/
pycache/

# Environment files
.env
backend/.env

#next.js
.next/
3 changes: 3 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Backend

Project backend structure and setup instructions.
1 change: 1 addition & 0 deletions backend/app/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# app package init
1 change: 1 addition & 0 deletions backend/app/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# api package init
1 change: 1 addition & 0 deletions backend/app/api/routes/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# routes package init
1 change: 1 addition & 0 deletions backend/app/core/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# core package init
12 changes: 12 additions & 0 deletions backend/app/core/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Configuration settings for FastAPI app
from pydantic_settings import BaseSettings

class Settings(BaseSettings):
database_url: str
ai_api_key: str

model_config = {
"env_file": ".env"
}

settings = Settings()
1 change: 1 addition & 0 deletions backend/app/db/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# db package init
1 change: 1 addition & 0 deletions backend/app/db/database.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Database connection setup
18 changes: 18 additions & 0 deletions backend/app/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
import os

app = FastAPI(title="Inpact Backend", version="0.1.0")

# --- CORS Setup (so frontend can talk to backend) ---
app.add_middleware(
CORSMiddleware,
allow_origins=os.getenv("ALLOWED_ORIGINS", "http://localhost:3000").split(","),
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)

@app.get("/")
def root():
return {"message": "Welcome to Inpact Backend πŸš€"}
1 change: 1 addition & 0 deletions backend/app/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# models package init
6 changes: 6 additions & 0 deletions backend/env_example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Example environment file for backend

DATABASE_URL=postgresql://user:password@localhost:5432/inpactdb
AI_API_KEY=your-ai-api-key-here

ALLOWED_ORIGINS=http://localhost:3000
23 changes: 23 additions & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
annotated-doc==0.0.3
annotated-types==0.7.0
anyio==4.11.0
black==25.9.0
click==8.3.0
fastapi==0.120.3
h11==0.16.0
idna==3.11
mypy_extensions==1.1.0
packaging==25.0
pathspec==0.12.1
platformdirs==4.5.0
pydantic==2.12.3
pydantic-settings>=2.0.3
pydantic_core==2.41.4
python-dotenv==1.2.1
pytokens==0.2.0
ruff==0.14.3
sniffio==1.3.1
starlette==0.49.1
typing-inspection==0.4.2
typing_extensions==4.15.0
uvicorn==0.38.0