Skip to content

Commit dd26a4d

Browse files
authored
Merge branch 'main' into usage-more-usage-more-usage-more
2 parents cf020de + 037147a commit dd26a4d

Some content is hidden

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

79 files changed

+2259
-2305
lines changed

.env.docker.example

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SECRET_KEY='secret-key'
33
LITESTAR_DEBUG=true
44
LITESTAR_HOST=0.0.0.0
55
LITESTAR_PORT=8000
6-
APP_URL=http://localhost:8000
6+
APP_URL=http://localhost:${LITESTAR_PORT}
77

88
LOG_LEVEL=10
99
# Database
@@ -23,7 +23,7 @@ SAQ_WEB_ENABLED=True
2323
SAQ_BACKGROUND_WORKERS=1
2424
SAQ_CONCURRENCY=1
2525

26-
VITE_HOST="localhost"
26+
VITE_HOST=localhost
2727
VITE_PORT=3006
2828
VITE_HOT_RELOAD=True
2929
VITE_DEV_MODE=True

.env.local.example

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SECRET_KEY='secret-key'
33
LITESTAR_DEBUG=true
44
LITESTAR_HOST=0.0.0.0
55
LITESTAR_PORT=8089
6-
APP_URL=http://localhost:8089
6+
APP_URL=http://localhost:${LITESTAR_PORT}
77

88
LOG_LEVEL=10
99
# Database
@@ -23,7 +23,7 @@ SAQ_WEB_ENABLED=True
2323
SAQ_BACKGROUND_WORKERS=1
2424
SAQ_CONCURRENCY=1
2525

26-
VITE_HOST="localhost"
26+
VITE_HOST=localhost
2727
VITE_PORT=5174
2828
VITE_HOT_RELOAD=True
2929
VITE_DEV_MODE=False

.env.testing

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
# App
2-
APP_SECRET_KEY='secret-key'
3-
APP_DEBUG=true
4-
APP_DEV_MODE=false
5-
APP_ENVIRONMENT=testing
6-
LOG_LEVEL=20
7-
APP_NAME=Starlite Application
8-
OPENAPI_CONTACT_EMAIL=admin@app
9-
OPENAPI_CONTACT_NAME="Administrator"
10-
OPENAPI_TITLE="Reference Application for Starlite"
11-
OPENAPI_VERSION=1.0.0
12-
DB_URL=postgresql+asyncpg://postgres:[email protected]:5423/postgres
2+
SECRET_KEY='secret-key'
133

144
# Cache
155
REDIS_URL=redis://localhost:6397/0
@@ -19,7 +9,7 @@ SAQ_WEB_ENABLED=True
199
SAQ_BACKGROUND_WORKERS=1
2010
SAQ_CONCURRENCY=1
2111

22-
VITE_HOST="localhost"
12+
VITE_HOST=localhost
2313
VITE_PORT=3006
2414
VITE_HOT_RELOAD=True
2515
VITE_DEV_MODE=True

.github/workflows/ci.yaml

+14-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ on:
55
push:
66
branches:
77
- main
8+
concurrency:
9+
group: test-${{ github.head_ref }}
10+
cancel-in-progress: true
811

12+
env:
13+
PYTHONUNBUFFERED: "1"
14+
FORCE_COLOR: "1"
915
jobs:
1016
validate:
1117
runs-on: ubuntu-latest
@@ -18,6 +24,9 @@ jobs:
1824
with:
1925
python-version: "3.11"
2026

27+
- name: Install base libraries
28+
run: pip install nodeenv cython setuptools pip --upgrade --quiet --user
29+
2130
- uses: pre-commit/[email protected]
2231

2332
test:
@@ -26,7 +35,7 @@ jobs:
2635
strategy:
2736
fail-fast: true
2837
matrix:
29-
python-version: ["3.11"]
38+
python-version: ["3.11","3.12"]
3039
steps:
3140
- name: Check out repository
3241
uses: actions/checkout@v4
@@ -43,7 +52,7 @@ jobs:
4352
name: Set up PDM
4453
with:
4554
python-version: ${{ matrix.python-version }}
46-
allow-python-prereleases: true
55+
allow-python-prereleases: false
4756
cache: true
4857
cache-dependency-path: |
4958
./pdm.lock
@@ -58,7 +67,8 @@ jobs:
5867
- name: Test with Coverage
5968
run: pdm run pytest tests --cov=app --cov-report=xml
6069

61-
- uses: actions/upload-artifact@v4
70+
- if: matrix.python-version == '3.11'
71+
uses: actions/upload-artifact@v4
6272
with:
6373
name: coverage-xml
6474
path: coverage.xml
@@ -81,7 +91,7 @@ jobs:
8191
name: Set up PDM
8292
with:
8393
python-version: "3.11"
84-
allow-python-prereleases: true
94+
allow-python-prereleases: false
8595
cache: true
8696

8797
- name: Install dependencies

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ temp/
169169
# built files from the web UI
170170
src/app/domain/web/public
171171
src/app/domain/web/public/hot
172-
public
173172
.vite
174173
src/app/domain/web/static
175174
public/hot

.pre-commit-config.yaml

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
3+
rev: v4.6.0
44
hooks:
55
- id: check-ast
66
- id: check-case-conflict
@@ -11,7 +11,7 @@ repos:
1111
- id: mixed-line-ending
1212
- id: trailing-whitespace
1313
- repo: https://github.com/charliermarsh/ruff-pre-commit
14-
rev: v0.2.2
14+
rev: v0.4.6
1515
hooks:
1616
- id: ruff
1717
args:
@@ -22,24 +22,25 @@ repos:
2222
- id: prettier
2323
exclude: templates|migrations|scripts|docs|dist|.venv|public
2424
- repo: https://github.com/ariebovenberg/slotscheck
25-
rev: v0.17.3
25+
rev: v0.19.0
2626
hooks:
2727
- id: slotscheck
2828
exclude: test_*|docs|migrations|scripts
2929
entry: env PYTHONPATH=src slotscheck
3030
- repo: https://github.com/pre-commit/mirrors-mypy
31-
rev: v1.8.0
31+
rev: v1.10.0
3232
hooks:
3333
- id: mypy
3434
exclude: scripts/
3535
additional_dependencies:
3636
- passlib[argon2]
3737
- asyncpg
3838
- asyncpg-stubs
39-
- litestar[cli,jinja,jwt,redis,sqlalchemy,standard,structlog]
40-
- litestar-vite
39+
- litestar[jinja,jwt,redis,structlog]
40+
- advanced-alchemy[uuid]>=0.10.0
41+
- litestar-granian
42+
- litestar-vite>=0.1.21
4143
- litestar-saq
42-
- types-freezegun
4344
- types-python-jose
4445
- types-click
4546
- types-redis

.vscode/extensions.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"christian-kohler.path-intellisense",
55
"ms-python.vscode-pylance",
66
"ms-python.python",
7-
"charliermarsh.ruff"
7+
"charliermarsh.ruff",
8+
"ms-python.mypy-type-checker"
89
]
910
}

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
| --------- | :-- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1313
| CI/CD | | [![Tests and Linting](https://github.com/litestar-org/litestar-fullstack/actions/workflows/ci.yaml/badge.svg)](https://github.com/litestar-org/litestar-fullstack/actions/workflows/ci.yaml) [![Documentation Building](https://github.com/litestar-org/litestar-fullstack/actions/workflows/docs.yaml/badge.svg)](https://github.com/litestar-org/litestar-fullstack/actions/workflows/docs.yaml) |
1414
| Quality | | [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=litestar-org_litestar-fullstack&metric=coverage)](https://sonarcloud.io/summary/new_code?id=litestar-org_litestar) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=litestar-org_litestar-fullstack&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=litestar-org_litestar) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=litestar-org_litestar-fullstack&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=litestar-org_litestar) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=litestar-org_litestar-fullstack&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=litestar-org_litestar) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=litestar-org_litestar-fullstack&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=litestar-org_litestar) |
15-
| Community | | [![Reddit](https://img.shields.io/reddit/subreddit-subscribers/litestarapi?label=r%2FLitestar&logo=reddit&labelColor=202235&color=edb641&logoColor=edb641)](https://reddit.com/r/litestarapi) [![Discord](https://img.shields.io/discord/919193495116337154?labelColor=202235&color=edb641&label=chat%20on%20discord&logo=discord&logoColor=edb641)](https://discord.gg/litestar-919193495116337154) [![Matrix](https://img.shields.io/badge/chat%20on%20Matrix-bridged-202235?labelColor=202235&color=edb641&logo=matrix&logoColor=edb641)](https://matrix.to/#/#litestar:matrix.org) [![Medium](https://img.shields.io/badge/Medium-202235?labelColor=202235&color=edb641&logo=medium&logoColor=edb641)](https://blog.litestar.dev) [![Twitter](https://img.shields.io/twitter/follow/LitestarAPI?labelColor=202235&color=edb641&logo=twitter&logoColor=edb641&style=flat)](https://twitter.com/LitestarAPI) [![Blog](https://img.shields.io/badge/Blog-litestar.dev-202235?logo=blogger&labelColor=202235&color=edb641&logoColor=edb641)](https://blog.litestar.dev) |
15+
| Community | | [![Reddit](https://img.shields.io/reddit/subreddit-subscribers/litestarapi?label=r%2FLitestar&logo=reddit&labelColor=202235&color=edb641&logoColor=edb641)](https://reddit.com/r/litestarapi) [![Discord](https://img.shields.io/discord/919193495116337154?labelColor=202235&color=edb641&label=chat%20on%20discord&logo=discord&logoColor=edb641)](https://discord.gg/litestar) [![Matrix](https://img.shields.io/badge/chat%20on%20Matrix-bridged-202235?labelColor=202235&color=edb641&logo=matrix&logoColor=edb641)](https://matrix.to/#/#litestar:matrix.org) [![Medium](https://img.shields.io/badge/Medium-202235?labelColor=202235&color=edb641&logo=medium&logoColor=edb641)](https://blog.litestar.dev) [![Twitter](https://img.shields.io/twitter/follow/LitestarAPI?labelColor=202235&color=edb641&logo=twitter&logoColor=edb641&style=flat)](https://twitter.com/LitestarAPI) [![Blog](https://img.shields.io/badge/Blog-litestar.dev-202235?logo=blogger&labelColor=202235&color=edb641&logoColor=edb641)](https://blog.litestar.dev) |
1616
| Meta | | [![Litestar Project](https://img.shields.io/badge/Litestar%20Org-%E2%AD%90%20Litestar-202235.svg?logo=python&labelColor=202235&color=edb641&logoColor=edb641)](https://github.com/litestar-org/litestar) [![types - Mypy](https://img.shields.io/badge/types-Mypy-202235.svg?logo=python&labelColor=202235&color=edb641&logoColor=edb641)](https://github.com/python/mypy) [![License - MIT](https://img.shields.io/badge/license-MIT-202235.svg?logo=python&labelColor=202235&color=edb641&logoColor=edb641)](https://spdx.org/licenses/) [![Litestar Sponsors](https://img.shields.io/badge/Sponsor-%E2%9D%A4-%23edb641.svg?&logo=github&logoColor=edb641&labelColor=202235)](https://github.com/sponsors/litestar-org) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json&labelColor=202235)](https://github.com/astral-sh/ruff) [![code style - Black](https://img.shields.io/badge/code%20style-black-000000.svg?logo=python&labelColor=202235&logoColor=edb641)](https://github.com/psf/black) [![All Contributors](https://img.shields.io/github/all-contributors/litestar-org/litestar?labelColor=202235&color=edb641&logoColor=edb641)](#contributors-) |
1717

1818
<!-- prettier-ignore-end -->
@@ -63,6 +63,14 @@ pdm run stop-infra
6363
docker compose up
6464
```
6565

66+
### Details
67+
68+
We have documented the process to help you get the repository up and running.
69+
Check out the [documentation][docs] for more information.
70+
71+
[//]: # "links"
72+
[docs]: https://docs.fullstack.litestar.dev/
73+
6674
<details>
6775

6876
<summary>Command Examples</summary>
@@ -291,11 +299,3 @@ Loading environment configuration from .env
291299
╰──────────────────────────────────────────────────────────────────────────────╯
292300
293301
```
294-
295-
### Details
296-
297-
We have documented the process to help you get the repository up and running.
298-
Check out the [documentation][docs] for more information.
299-
300-
[//]: # "links"
301-
[docs]: https://docs.fullstack.litestar.dev/

deploy/docker/dev/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ COPY pyproject.toml pdm.lock README.md .pre-commit-config.yaml LICENSE Makefile
5050
tailwind.config.cjs postcss.config.cjs components.json \
5151
./
5252
COPY scripts ./scripts/
53+
COPY public ./public/
5354
COPY resources ./resources/
5455
RUN python -m venv --copies /workspace/app/.venv \
5556
&& /workspace/app/.venv/bin/pip install cython pdm nodeenv \

deploy/docker/run/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ COPY pyproject.toml pdm.lock README.md .pre-commit-config.yaml LICENSE Makefile
5050
tailwind.config.cjs postcss.config.cjs components.json \
5151
./
5252
COPY scripts ./scripts/
53+
COPY public ./public/
5354
COPY resources ./resources/
5455
RUN python -m venv --copies /workspace/app/.venv \
5556
&& /workspace/app/.venv/bin/pip install --quiet pdm nodeenv cython \

deploy/docker/run/Dockerfile.distroless

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ COPY pyproject.toml pdm.lock README.md .pre-commit-config.yaml LICENSE Makefile
5858
RUN python -m venv --copies /workspace/app/.venv \
5959
&& /workspace/app/.venv/bin/pip install --quiet pdm nodeenv cython mypy
6060
COPY scripts ./scripts/
61+
COPY public ./public/
6162
COPY resources ./resources/
6263
RUN pdm install ${PDM_INSTALL_ARGS} --no-self \
6364
&& pdm export ${PDM_INSTALL_ARGS} --without-hashes --prod --output=requirements.txt

docker-compose.override.yml

+2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ x-development-volumes: &development-volumes
1010
- ./tsconfig.json:/workspace/app/tsconfig.json
1111
- ./tsconfig.node.json:/workspace/app/tsconfig.node.json
1212
- ./package.json:/workspace/app/package.json
13+
- ./package-lock.json:/workspace/app/package-lock.json
1314
- ./vite.config.ts:/workspace/app/vite.config.ts
1415
- ./resources:/workspace/app/resources
16+
- ./public:/workspace/app/public
1517
- ./components.json:/workspace/app/components.json
1618
- ./tailwind.config.cjs:/workspace/app/tailwind.config.cjs
1719
- ./postcss.config.cjs:/workspace/app/postcss.config.cjs

docs/index.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@ and as a reference for how to build a large scale fullstack Litestar application
99
You can take pieces as needed, or use the entire thing as a starting point for your project.
1010
It includes the following capabilities out of the box:
1111

12-
.. seealso:: It is built on the `Litestar <https://litestar.dev>`_, VueJS, `Vite <https://vitejs.dev/>`_,
12+
.. seealso:: It is built on the `Litestar <https://litestar.dev>`_, ReactJS, `Vite <https://vitejs.dev/>`_,
1313
:doc:`SAQ <saq:index>`, `TailwindCSS <https://tailwindcss.com/>`_ and comes with great features to reference:
1414

1515
- User creation, authentication, and authorization
1616
- Job/Task Queues via :doc:`SAQ <saq:index>`
17-
- Fully featured frontend stack with VueJS and native Vite integration via
17+
- Fully featured frontend stack with ReactJS (supports Vue, Angular, and all other JS frameworks) and native Vite integration via
1818
the `litestar-vite <https://github.com/cofin/litestar-vite>`_ plugin
1919
- Fully featured backend API with Litestar
2020
- Includes the utilization of :doc:`Guards <litestar:usage/security/guards>` and team-based authentication,
2121
- Extensive CLI
2222
- Advanced logging with :doc:`structlog <structlog:index>`
23-
- SQLAlchemy ORMs, inlcuding the :doc:`Advanced Alchemy <advanced-alchemy:index>` helper library by `Jolt <https://jolt.rs>`_
23+
- SQLAlchemy ORMs, including the :doc:`Advanced Alchemy <advanced-alchemy:index>` helper library by `Jolt <https://jolt.rs>`_
24+
- UUIDv7 based Primary Keys using `uuid-utils`
2425
- AioSQL for raw queries without the ORM
2526
- Alembic migrations
2627
- Dockerized development and production environments

0 commit comments

Comments
 (0)