From 912e10e82494b3ff8c53ece41c91ed9e7ec5358f Mon Sep 17 00:00:00 2001 From: 21f3002231 Date: Sat, 3 Jan 2026 17:29:50 +0530 Subject: [PATCH 1/4] Added Readme.md file --- README.md | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) diff --git a/README.md b/README.md index e69de29..c8f2629 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,127 @@ +# NxtDo Backend + +A FastAPI backend application with Firebase authentication. + +## Project Structure + +``` +├── app/ +│ ├── main.py # FastAPI application entry point +│ ├── api/ +│ │ └── tasks.py # Task-related API endpoints +│ └── core/ +│ ├── config.py # Application configuration +│ ├── database.py # Database connection setup +│ └── firebase.py # Firebase integration +├── Dockerfile # Docker container configuration +├── pyproject.toml # Python dependencies and project metadata +├── uv.lock # uv lockfile for reproducible builds +├── .env.example # Environment variables template +└── .python-version # Python version specification (3.12) +``` + +## Prerequisites + +- Python 3.12 +- [uv](https://docs.astral.sh/uv/) - Fast Python package manager +- Firebase project with service account credentials +- (Optional) Azure AD for authentication + +## Local Setup + +### 1. Clone the repository + +```bash +git clone +cd nxtdo-backend +``` + +### 2. Install uv (if not already installed) + +```bash +# On Windows (PowerShell) +powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" + +# On macOS/Linux +curl -LsSf https://astral.sh/uv/install.sh | sh +``` + +### 3. Install dependencies + +```bash +# This creates a virtual environment and installs all dependencies +uv sync +``` + +### 4. Configure environment variables + +```bash +# Copy the example environment file +cp .env.example .env +``` + +Update the `.env` file with your configuration: + +| Variable | Description | +|----------|-------------| +| `ENVIRONMENT` | `development` or `production` | +| `GCP_PROJECT_ID` | Your Google Cloud Project ID | +| `FIREBASE_SERVICE_ACCOUNT_KEY` | Firebase service account JSON (as a single line) | +| `AZURE_CLIENT_ID` | (Optional) Azure AD Client ID | +| `AZURE_TENANT_ID` | (Optional) Azure AD Tenant ID | + +### 5. Run the application + +```bash +# Using uv run (recommended) +uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 + +# Or activate the virtual environment first +# On Windows +.venv\Scripts\activate +# On macOS/Linux +source .venv/bin/activate + +# Then run uvicorn +uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 +``` + +The API will be available at: `http://localhost:8000` + +## API Documentation + +Once running, access the interactive API documentation: +- Swagger UI: `http://localhost:8000/docs` +- ReDoc: `http://localhost:8000/redoc` + +## Running with Docker + +```bash +# Build the image +docker build -t nxtdo-backend . + +# Run the container +docker run -p 8080:8080 --env-file .env nxtdo-backend +``` + +> **Note:** The Docker container runs on port `8080` by default. + +## Development + +### Adding new dependencies + +```bash +uv add +``` + +### Running tests + +```bash +uv run pytest +``` + +### Code checks + +```bash +uv run python .github/check.py +``` From dff97039cf01a645ecf5178479603661e863f808 Mon Sep 17 00:00:00 2001 From: Sai Sumanth Vadla <104812692+Saisumanthv@users.noreply.github.com> Date: Tue, 27 Jan 2026 18:36:53 +0530 Subject: [PATCH 2/4] added installation instructions --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c8f2629..d24c74b 100644 --- a/README.md +++ b/README.md @@ -125,3 +125,5 @@ uv run pytest ```bash uv run python .github/check.py ``` + +Note: Follow these instructions to set up and run the application successfully. \ No newline at end of file From ca86e91e5129aa26de1e0500fa5a53a9cf69ff4a Mon Sep 17 00:00:00 2001 From: dharavthjayanth Date: Wed, 28 Jan 2026 16:40:26 +0530 Subject: [PATCH 3/4] added api-backend --- app/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/main.py b/app/main.py index e7ef95f..1750389 100644 --- a/app/main.py +++ b/app/main.py @@ -78,6 +78,10 @@ def create_task(task: TaskCreate): except Exception as e: raise HTTPException(status_code=500, detail=str(e)) +@app.get("/about",response_class=PlainTextResponse) +def about_backend(): + return "This is all backend" + @app.get("/tasks") def list_tasks(limit: int = 100): """List all tasks""" From 8b2c16173631c23abedb0134a39b22ac308303fa Mon Sep 17 00:00:00 2001 From: Pard643 Date: Sun, 15 Feb 2026 15:46:24 +0530 Subject: [PATCH 4/4] added api_backend --- app/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/main.py b/app/main.py index 1750389..9a26a83 100644 --- a/app/main.py +++ b/app/main.py @@ -57,6 +57,9 @@ def read_root(): "environment": settings.ENVIRONMENT, "project": settings.GCP_PROJECT_ID } +@app.get("/about",response_class=PlainTextResponse) +def about_backend(): + return "This is all backend" @app.get("/health") def health_check():