Skip to content

Commit 46fa740

Browse files
authored
Merge pull request #752 from Nickatak/feat/auth
feat: Stage 1 authentication
2 parents 5590e77 + 80790d9 commit 46fa740

67 files changed

Lines changed: 3828 additions & 2377 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ backend/openapi-schema.yml
3838

3939
# vite
4040
frontend/vite.config.*.timestamp-*
41-
frontend/dist
41+
frontend/dist

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@ labels: ''
66
assignees: ''
77

88
---
9-
10-

.github/ISSUE_TEMPLATE/dev-onboarding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ assignees: ''
1010

1111
### Overview
1212

13-
This issue has been created for our new Developer [PLEASE ADD WHETHER FRONT-END OR BACK-END] to familiarize themselves with CTJ project and set-up their dev environment.
13+
This issue has been created for our new Developer [PLEASE ADD WHETHER FRONT-END OR BACK-END] to familiarize themselves with CTJ project and set-up their dev environment.
1414

1515
### Action Items
1616

.github/workflows/deploy-stage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
id: redeploy-service
4343
env:
4444
CLUSTER_NAME: incubator-prod
45-
SERVICE_NAME: civic-tech-jobs-fs-stage
45+
SERVICE_NAME: civic-tech-jobs-fs-stage
4646
run: |
47-
aws ecs update-service --force-new-deployment --service $SERVICE_NAME --cluster $CLUSTER_NAME
47+
aws ecs update-service --force-new-deployment --service $SERVICE_NAME --cluster $CLUSTER_NAME

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ jobs:
5555
SQL_PASSWORD: lint
5656
SQL_HOST: localhost
5757
SQL_PORT: "5432"
58-
run: poetry run mypy ctj_api backend
58+
run: poetry run mypy accounts ctj_api backend
5959

6060
- name: bandit
61-
run: poetry run bandit -r ctj_api backend -c pyproject.toml -q
61+
run: poetry run bandit -r accounts ctj_api backend -c pyproject.toml -q
6262

6363
frontend:
6464
name: Frontend lint (eslint + stylelint + knip + tsc + prettier)

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ backend/frontend_dist
2828
backend/staticfiles
2929

3030
# Nick's personal working dir
31-
scratch/
31+
scratch/

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ DEV_ENV := dev/dev.env
2020
# because dev.env's `pgdb` is a docker-network DNS name; on host, pgdb's port
2121
# is published on localhost.
2222
BACKEND_RUN := set -a; . $(DEV_ENV); SQL_HOST=localhost; set +a; cd $(BACKEND_DIR) && poetry run
23+
# Same idea for the host Next dev server: dev.env's BACKEND_INTERNAL_URL points
24+
# at the docker `django` service for compose; on host, override to localhost
25+
# so next.config.ts's rewrites() proxies /api/* + /admin/* to the host backend
26+
# (`make local-run-backend` on :8000). Same-origin in dev like stage/prod.
27+
FRONTEND_RUN := set -a; . $(DEV_ENV); BACKEND_INTERNAL_URL=http://localhost:8000; set +a; cd $(FRONTEND_DIR)
2328
DEV_COMPOSE ?= docker compose
2429
STAGE_COMPOSE ?= docker compose -f docker-compose.stage.yml
2530
STAGE_ENV := stage/stage.env
@@ -117,7 +122,7 @@ local-stop-docker-backend:
117122
@$(DEV_COMPOSE) stop $(BACKEND_SERVICE) >/dev/null 2>&1 || true
118123

119124
local-run-frontend: local-stop-docker-frontend
120-
cd $(FRONTEND_DIR) && npm run dev
125+
$(FRONTEND_RUN) && npm run dev
121126

122127
local-run-backend: local-stop-docker-backend local-check-db
123128
$(BACKEND_RUN) python manage.py runserver
@@ -134,7 +139,7 @@ local-superuser:
134139
local-test: local-test-backend local-test-frontend
135140

136141
local-test-backend:
137-
$(BACKEND_RUN) python manage.py test ctj_api.tests --keepdb --noinput
142+
$(BACKEND_RUN) python manage.py test --keepdb --noinput
138143

139144
local-test-frontend:
140145
cd $(FRONTEND_DIR) && npx vitest run

backend/.dockerignore

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
# backend dockerignore
2-
# .dockerignore should be in the build context root
3-
4-
# Environment files
5-
.env
6-
*/*.env
7-
*venv/
8-
.DS_store
9-
10-
# Django
11-
*.log
12-
*.pot
13-
*.pyc
14-
**/__pycache__/
15-
db.sqlite3
16-
data
17-
media
18-
19-
# Docker
20-
.dockerignore
21-
22-
# git
23-
.git
24-
.gitignore
25-
26-
# Builds
27-
frontend/static/vite_assets_dist/*
28-
staticfiles
1+
# backend dockerignore
2+
# .dockerignore should be in the build context root
3+
4+
# Environment files
5+
.env
6+
*/*.env
7+
*venv/
8+
.DS_store
9+
10+
# Django
11+
*.log
12+
*.pot
13+
*.pyc
14+
**/__pycache__/
15+
db.sqlite3
16+
data
17+
media
18+
19+
# Docker
20+
.dockerignore
21+
22+
# git
23+
.git
24+
.gitignore
25+
26+
# Builds
27+
frontend/static/vite_assets_dist/*
28+
staticfiles

backend/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
.idea
33
DCIM
44
data
5-
staticfiles
5+
staticfiles

backend/accounts/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)