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
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
Comment thread
Maleesha101 marked this conversation as resolved.
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
14 changes: 14 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Adhya local development configuration
# Copy to .env locally. Never commit real credentials.

APP_ENV=local
APP_DEBUG=false
APP_PORT=8080

POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=adhya
POSTGRES_USER=adhya
POSTGRES_PASSWORD=change-me

API_BASE_URL=http://localhost:8080
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text=auto eol=lf
*.sh text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.md text eol=lf
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Default repository ownership baseline.
# Refine this mapping when dedicated GitHub teams are established.
* @Maleesha101
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug
about: Report a reproducible defect
title: "[Bug] "
labels: ""
assignees: ""
---

## Problem
Describe the observed behavior.

## Expected Behavior

## Reproduction Steps
1.
2.
3.

## Impact
- Security impact:
- Data impact:
- API impact:

## Validation
- [ ] Regression test added or updated
- [ ] Existing tests reviewed
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Feature
about: Propose or implement a product capability
title: "[Feature] "
labels: ""
assignees: ""
---

## Definition
Describe the engineering outcome.

## Complexity
- [ ] Low
- [ ] Medium
- [ ] High

## Dependencies
List prerequisite issues/features.

## Subtasks
- [ ]

## Definition of Done
- [ ] Implementation
- [ ] Tests
- [ ] Security checks
- [ ] Documentation
- [ ] CI validation

## Scope / Notes
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Security
about: Report a security issue or security engineering task
title: "[Security] "
labels: ""
assignees: ""
---

## Security Concern
Describe the security behavior or suspected vulnerability without exposing secrets or sensitive data.

## Affected Area

## Threat / Abuse Scenario

## Expected Security Property

## Validation Plan
- [ ] Negative test
- [ ] Regression test
- [ ] Security test

## Disclosure Notes
Do not include credentials, tokens, private keys, or real patient data.
36 changes: 36 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Related Issue
Closes #

## Summary
-

## Design / Approach
-

Comment thread
Maleesha101 marked this conversation as resolved.
## UI Evidence
- [ ] Not applicable
- [ ] Screenshots attached for UI changes

> For UI changes, attach screenshots showing the relevant changed states. Do not include real patient data, credentials, tokens, or other sensitive information.

## Validation
- [ ] Unit tests
- [ ] Integration/API tests
- [ ] Security checks
- [ ] Test coverage reviewed

## Impact
- **Security:** None / Describe
- **Database:** None / Describe
- **API:** None / Describe
- **FHIR:** None / Describe
- **Documentation:** None / Describe

## Checklist
- [ ] Scope matches the issue
- [ ] Synthetic healthcare data only
- [ ] No secrets committed
- [ ] Authorization impact considered
- [ ] Documentation updated where required
- [ ] CI passes
- [ ] Known limitations documented
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

permissions:
contents: read

jobs:
repository-validation:
name: Repository validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Validate foundation files
shell: bash
run: |
set -euo pipefail
test -f AGENTS.md
test -f docs/architecture/ARCHITECTURE.md
test -f docs/development/git-workflow.md
test -f docs/development/development-guide.md
test -f docs/development/coding-standards.md
test -f docs/development/environment-strategy.md
test -f docs/architecture/ADR/README.md

- name: Check for tracked environment files
shell: bash
run: |
set -euo pipefail
if git ls-files | grep -E '(^|/)\.env$|(^|/)\.env\.(local|development|staging|production)$'; then
echo "A non-example environment file is tracked."
exit 1
fi

- name: Check for obvious private-key files
shell: bash
run: |
set -euo pipefail
if git ls-files | grep -E '\.(pem|key|p12|pfx)$'; then
echo "Potential private-key material is tracked."
exit 1
fi
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Local environment
.env
.env.*
!.env.example

# Project-level editor configuration is tracked intentionally
# OS / editor
.DS_Store
Thumbs.db
.idea/
.vscode/
*.swp
*.swo

# Logs
*.log
logs/

# Test / coverage output
coverage/
.coverage/
.pytest_cache/
.junit/
test-results/

# Build artifacts
build/
dist/
target/
bin/
obj/

# Local databases / volumes
*.sqlite
*.sqlite3
docker-data/
postgres-data/

# Secrets / certificates
*.pem
*.key
*.p12
*.pfx
secrets/
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.PHONY: validate compose-config db-up db-down

validate:
@test -f AGENTS.md
@test -f docs/architecture/ARCHITECTURE.md
@test -f docs/development/git-workflow.md
@test -f docs/development/development-guide.md
@test -f docs/development/coding-standards.md
@test -f docs/development/environment-strategy.md
@test -f docs/architecture/ADR/README.md
@test ! -f .env
@test ! -f .env.local

compose-config:
docker compose config

db-up:
docker compose up -d postgres

db-down:
docker compose down
23 changes: 23 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
services:
postgres:
image: postgres:16-alpine
Comment thread
Maleesha101 marked this conversation as resolved.
container_name: adhya-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-adhya}
POSTGRES_USER: ${POSTGRES_USER:-adhya}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- adhya-postgres-data:/var/lib/postgresql/data
# FHIR server and other platform dependencies are introduced in their
# dedicated feature/platform iterations rather than this F01 baseline.
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-adhya} -d ${POSTGRES_DB:-adhya}"]
interval: 10s
timeout: 5s
retries: 5

volumes:
adhya-postgres-data:
78 changes: 78 additions & 0 deletions docs/development/technical-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# F01 — Repository Technical Setup

## Objective

Establish the minimum reproducible engineering baseline required before product-feature implementation expands.

## Scope

This setup establishes:

- repository/editor conventions
- GitHub issue and pull-request templates
- code ownership baseline
- CI repository validation
- environment-variable conventions
- a minimal local PostgreSQL development dependency
- developer commands for local validation

It intentionally does not implement application services, authentication, FHIR APIs, WSO2, Siddhi, Kubernetes, LLM integration, or PQC. Those belong to later feature/platform work.

## Local prerequisites

Comment thread
Maleesha101 marked this conversation as resolved.
- Git
- Docker Engine
- Docker Compose
- Make
- Node.js 22 LTS for the planned Next.js web application
- Go 1.25 or later for the WSO2 FHIR Server integration/development workflow

### WSO2 FHIR Server compatibility baseline

The current WSO2 FHIR Server documentation identifies:

| Component | Baseline |
|---|---|
| FHIR | R4 (4.0.1) |
| Go | 1.25 or later |
| PostgreSQL | 14 through 18 |

The WSO2 FHIR Server is a Go-based FHIR R4 server backed by PostgreSQL. It can be introduced as the interoperability layer in a later F12 implementation step; it is intentionally not started by the F01 local Compose stack.

## Configuration

Create a local .env from .env.example and replace placeholder values where required.

Never commit .env, credentials, tokens, private keys, or real healthcare data.

## Local database

The local PostgreSQL service is provided by Docker Compose.

Default connection:

- host: localhost
- port: 5432
- database: adhya
- user: adhya

The database is development-only and must contain synthetic data.

## Validation

Use:

- make validate for repository checks
- make compose-config for Compose validation
- make db-up to start PostgreSQL
- make db-down to stop local services

Application services and migrations will be introduced with their respective feature implementations.

## CI baseline

Pull requests and pushes to main run repository validation. Application-specific unit, integration, API, and security tests should be added to CI when the corresponding implementation exists.

## Scope boundary

Do not add production infrastructure or the final microservice topology during F01 merely to make the repository appear complete. Infrastructure should be introduced when required by an implemented capability.
Loading