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
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*Issue #, if available:*

*Description of changes:*

*Testing done:*

## Merge Checklist

_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._

- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) doc
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have updated the necessary documentation (if applicable)
- [ ] Any dependent changes have been merged and published

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT-0 license.
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

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

jobs:
backend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install -r requirements-dev.txt
- run: ruff check .
- run: black --check .
- run: pytest --cov -v

frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
- run: npm run lint
- run: npx tsc --noEmit
- run: npm run build

infrastructure:
runs-on: ubuntu-latest
defaults:
run:
working-directory: infrastructure
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
# cdk synth builds the frontend (the frontend stack bundles the SPA),
# so its dependencies must be installed too
- run: npm ci
working-directory: frontend
- run: npm run lint
- run: npm run build
- run: npx cdk synth
94 changes: 94 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# ============================================================================
# .gitignore - POIS Reference Server 2.0.0 Monorepo
# ============================================================================
# Covers: Python backend (Lambda), React/TypeScript frontend (Vite),
# AWS CDK infrastructure, Python docs-generator, MkDocs docs
# ============================================================================

# ----------------------------------------------------------------------------
# Node.js
# ----------------------------------------------------------------------------
node_modules/
dist/
build/
*.js.map
.npm
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# ----------------------------------------------------------------------------
# Python
# ----------------------------------------------------------------------------
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
venv/
.venv*/
*.egg-info/
.eggs/
pip-log.txt
pip-delete-this-directory.txt

# ----------------------------------------------------------------------------
# AWS CDK
# ----------------------------------------------------------------------------
cdk.out/
cdk.out.frontend/
.cdk.staging/
cdk.context.json

# ----------------------------------------------------------------------------
# Environment Variables
# ----------------------------------------------------------------------------
.env
.env.*

# ----------------------------------------------------------------------------
# IDE / Editor
# ----------------------------------------------------------------------------
.idea/
.vscode/
*.swp
*.swo
*~
.DS_Store
Thumbs.db

# ----------------------------------------------------------------------------
# Build / Coverage / Testing
# ----------------------------------------------------------------------------
coverage/
.nyc_output/
htmlcov/
*.lcov
.coverage
.coverage.*
.pytest_cache/
.mypy_cache/

# ----------------------------------------------------------------------------
# Lambda Packaging
# ----------------------------------------------------------------------------
backend/dist/
*.zip

# ----------------------------------------------------------------------------
# Logs
# ----------------------------------------------------------------------------
*.log
deploy.log

# ----------------------------------------------------------------------------
# Misc
# ----------------------------------------------------------------------------
tmp/
.cache/
site/

# IDE and OS files
.hypothesis/
.kiro/
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
dist/
build/
cdk.out/
coverage/
htmlcov/
*.md
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2
}
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.PHONY: install build test lint typecheck format deploy destroy synth clean help

help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

install: ## Install all dependencies
cd backend && python3 -m venv .venv && . .venv/bin/activate && pip install -r requirements-dev.txt
cd frontend && npm install
cd infrastructure && npm install

build: ## Build all packages (Lambda bundling happens automatically at deploy)
cd frontend && npm run build
cd infrastructure && npm run build

test: ## Run all tests
cd backend && . .venv/bin/activate && pytest --cov

lint: ## Run linters
cd backend && . .venv/bin/activate && ruff check . && black --check .
cd frontend && npm run lint && npx tsc --noEmit

typecheck: ## Run mypy on the backend (not yet clean - work in progress)
cd backend && . .venv/bin/activate && mypy .

format: ## Auto-format code
cd backend && . .venv/bin/activate && ruff check --fix . && black .

deploy: ## Deploy infrastructure (usage: make deploy ADMIN_EMAIL=you@example.com)
cd infrastructure && npx cdk deploy --all --require-approval never $(if $(ADMIN_EMAIL),-c adminEmail=$(ADMIN_EMAIL))

destroy: ## Destroy all AWS resources
cd infrastructure && npx cdk destroy --all --force

synth: ## Synthesize CDK templates (dry-run)
cd infrastructure && npx cdk synth

clean: ## Remove build artifacts
rm -rf backend/dist backend/build frontend/dist infrastructure/cdk.out
rm -rf backend/.venv backend/htmlcov backend/.pytest_cache backend/.mypy_cache
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type d -name node_modules -exec rm -rf {} + 2>/dev/null || true
2 changes: 2 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
POIS Reference Server
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Loading
Loading