Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
105fdaa
Main project structure
danniel Jun 5, 2026
3566167
models WIP
danniel Jun 7, 2026
5ebbc69
Add pyproject
danniel Jun 8, 2026
f54bf84
WIP Add more model structure
danniel Jun 8, 2026
5062966
More models WIP
danniel Jun 9, 2026
e6aeb06
Add more type hints
danniel Jun 9, 2026
88dc79e
More models WIP
danniel Jun 9, 2026
d656cae
Model file path WIP
danniel Jun 17, 2026
4271152
Use a simpler file path structure
danniel Jun 17, 2026
807e989
More models WIP on project and jury forms
danniel Jun 18, 2026
6c7b463
More forms WIP
danniel Jun 19, 2026
07450af
Improve type hints
danniel Jun 22, 2026
7285a7c
Add more 3rd party libraries
danniel Jun 22, 2026
d3de595
Use the settings module from another project
danniel Jun 23, 2026
9c31a95
Settings and ENV WIP
danniel Jun 24, 2026
d753f36
Docker temporary mods
danniel Jun 26, 2026
ae29a4c
Improve dockerization and models
danniel Jun 29, 2026
c709e7a
Create initial migrations
danniel Jun 30, 2026
1e4d85d
Disable unused init actions
danniel Jun 30, 2026
7a578f0
Add a temp landing page
danniel Jun 30, 2026
2900756
Code format
danniel Jun 30, 2026
8ed2ad5
Add the test settings
danniel Jun 30, 2026
408b998
seed the django admin
danniel Jun 30, 2026
e276e5d
Set default seed users to None
danniel Jun 30, 2026
f9f2f26
Fix test settings name
danniel Jun 30, 2026
ffebd60
Add eslint config
danniel Jun 30, 2026
6dfd7da
Add a basic test case
danniel Jun 30, 2026
2384be5
Move the basic test to the Editions app
danniel Jun 30, 2026
00e0742
Frontend lint fixes
danniel Jun 30, 2026
92ad155
Frontend lint
danniel Jun 30, 2026
c3c45b2
Add missing frontend types
danniel Jun 30, 2026
29d5152
Add sample profile urls
danniel Jun 30, 2026
1c52ba8
Tweak pytest conf
danniel Jul 1, 2026
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
frontend/dist
frontend/node_modules
88 changes: 88 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Type hints based on parameter naming #####
#
# booleans: [<app_name>_] VERB_...
# [<app_name>_] ALLOW_... | ENABLE_... | FAIL_... | HAS_...
# | INCLUDE_... | IS_... | RUN_... | USE_... | ..._DEBUG
#
# numbers: [<app_name>_] ..._QUANTITY-NOUN
# [<app_name>_] ..._COUNT | ..._NUMBER | ..._RATE | ..._TOTAL
#
# strings: Everything else


# Valid choices: "development", "debug", "debugwait"; anything else will cause it to run in production mode
ENVIRONMENT="development"

ENABLE_MAINTENANCE_MODE=False
MAINTENANCE_MESSAGE=""

DEBUG=True
DJANGO_VITE_DEV_MODE=True
DJANGO_VITE_DEV_SERVER_PORT=3000

ALLOWED_HOSTS=localhost
SECRET_KEY="replace-this-example-key"
SENTRY_DSN=""

CORS_ALLOWED_ORIGINS=http://localhost:3000
CORS_ALLOW_ALL_ORIGINS=True

# Django admin panel & superuser
ENABLE_DJANGO_ADMIN=False
[email protected]
DJANGO_ADMIN_PASSWORD=Funding.333

# Regular admin account
[email protected]
SEED_ADMIN_PASSWORD=Funding.333

# back-end start-up
RUN_MIGRATIONS=True
RUN_COLLECT_STATIC=True
RUN_SEED_GROUPS=True
RUN_SEED_LOCATIONS=True
RUN_CREATE_SUPER_USER=True
RUN_CREATE_ADMIN=True

# database
# change DATABASE_ENGINE to "mysql" if you want to use MySQL or "postgresql" for PostgreSQL
DATABASE_ENGINE=sqlite3
# these are only used if DATABASE_ENGINE is "mysql" or "postgresql"
DATABASE_NAME=funding
DATABASE_USER=user
DATABASE_PASSWORD=password
# the default host of the DB; it's probably one of "db_mysql_dev" or "db_psql_dev"
DATABASE_HOST=db_psql_dev
# the default port is 5432 for PostgreSQL and 3306 for MySQL
DATABASE_PORT=5432

# Email addresses
[email protected]
[email protected]
[email protected]

# Email server
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_SEND_METHOD=sync

# Background tasks
BACKGROUND_WORKERS_COUNT=1

# Recaptcha is disabled if no public key is provided
RECAPTCHA_PUBLIC_KEY=
RECAPTCHA_PRIVATE_KEY=

# Two factor auth
ENABLE_2FA=False

# Certificate bundle path
# CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt

# Version display
# VITE_VERSION=
# VITE_REVISION=
123 changes: 123 additions & 0 deletions .github/workflows/backend_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Backend Check

on:
push:
branches:
- 'main'
paths:
- 'backend/**.py'
- 'backend/uv.lock'
- 'backend/pyproject.toml'
- 'Dockerfile*'
- 'docker-compose*.yml'
- '.github/workflows/backend_check.yml'
pull_request:
branches:
- 'main'
paths:
- 'backend/**.py'
- 'backend/requirements*.*'
- 'backend/pyproject.toml'
- 'Dockerfile*'
- 'docker-compose*.yml'
- '.github/workflows/backend_check.yml'

jobs:
static_analysis:
name: Run static analysis
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
working-directory: ./backend
python-version: "3.13"
cache-dependency-glob: |
**/pyproject.toml
**/uv.lock

- name: Install Ruff with uv
working-directory: ./backend
run: |
uv sync --only-group ruff

- name: Check formatting with Ruff
working-directory: ./backend
run: |
uv run ruff format --check .

- name: Check linting using Ruff
working-directory: ./backend
run: |
uv run ruff check --select I .


checking_migrations:
name: Check for migrations
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
working-directory: ./backend
python-version: "3.13"
cache-dependency-glob: |
**/pyproject.toml
**/uv.lock

- name: Install dependencies
working-directory: ./backend
run: |
uv sync

- name: Check for migrations
working-directory: ./backend
env:
SECRET_KEY: testing
run: |
set -a
uv run ./manage.py makemigrations --check --dry-run
set +a


tests:
name: Run backend tests
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
working-directory: ./backend
python-version: "3.13"
cache-dependency-glob: |
**/pyproject.toml
**/uv.lock

- name: Install dependencies
working-directory: ./backend
env:
SECRET_KEY: testing
run: |
uv sync
sudo apt-get update
sudo apt-get install gettext
uv run ./manage.py compilemessages

- name: Run tests
working-directory: ./backend
env:
SECRET_KEY: testing
DJANGO_SETTINGS_MODULE: funding.test_settings
run: |
uv run pytest -Wd --cov --cov-report=xml --cov-report=term-missing --cov-fail-under=60 -n auto
21 changes: 21 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
push:
branches:
- 'main'
tags:
- 'v*'

name: Build Docker image

jobs:

build:
name: Build Docker image
uses: code4romania/.github/.github/workflows/build-push-image-ecr.yml@main
with:
image_name: funding_call
region: eu-west-1
context: ./
dockerfile: ./docker/dockerfiles/Dockerfile
secrets:
role_to_assume: ${{ secrets.ROLE_TO_ASSUME }}
65 changes: 65 additions & 0 deletions .github/workflows/frontend_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Frontend Check

on:
push:
branches:
- 'main'
paths:
- 'frontend/**.js'
- 'frontend/**.jsx'
- 'frontend/**.ts'
- 'frontend/**.tsx'
- 'frontend/**.css'
- 'frontend/**.json'
- 'frontend/package*.json'
- 'Dockerfile*'
- 'docker-compose*.yml'
- '.github/workflows/frontend_check.yml'
pull_request:
branches:
- 'main'
paths:
- 'frontend/**.js'
- 'frontend/**.jsx'
- 'frontend/**.ts'
- 'frontend/**.tsx'
- 'frontend/**.css'
- 'frontend/**.json'
- 'frontend/package*.json'
- 'Dockerfile*'
- 'docker-compose*.yml'
- '.github/workflows/frontend_check.yml'

jobs:
npm_prod:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 24 ]
name: Run `npm run build` in production mode for Node.js ${{ matrix.node }}

steps:
- name: Check out Git repository
uses: actions/checkout@v5

- name: Set-up Node.js 24.x
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
working-directory: ./frontend
run: |
npm ci

- name: Lint the project
working-directory: ./frontend
run: |
npm run lint

- name: Build frontend
working-directory: ./frontend
run: |
npm run prod
Loading
Loading