Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

Commit a63f898

Browse files
authored
feat: monorepo (#2)
* feat: multi-collections * feat: monorepo * fix * core
1 parent 476f553 commit a63f898

92 files changed

Lines changed: 19816 additions & 126660 deletions

File tree

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: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
Dockerfile
2-
.dockerignore
31
node_modules
4-
npm-debug.log
5-
yarn-debug.log
6-
README.md
7-
CHANGELOG.md
8-
.next
9-
.vscode
10-
.github
11-
.kontinuous
12-
.git
2+
app/node_modules
3+
app/.next
4+
app/out
5+
.next

.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/docker.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ jobs:
2020
registry: ghcr.io
2121
username: ${{ github.actor }}
2222
password: ${{ github.token }}
23-
- name: Build and push
23+
- name: Build and push app
2424
uses: docker/build-push-action@v6
2525
with:
26+
file: Dockerfile-app
2627
push: true
2728
tags: |
2829
ghcr.io/${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG }}/albert-docs:${{ env.GITHUB_REF_SLUG }}
@@ -32,3 +33,16 @@ jobs:
3233
build-args: |
3334
PRODUCTION="true"
3435
GITHUB_SHA=${{ github.sha }}
36+
- name: Build and push api
37+
uses: docker/build-push-action@v6
38+
with:
39+
file: Dockerfile-api
40+
push: true
41+
tags: |
42+
ghcr.io/${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG }}/albert-docs/api:${{ env.GITHUB_REF_SLUG }}
43+
${{ github.ref_name == 'main' && format('ghcr.io/{0}/albert-docs/api:latest', env.GITHUB_REPOSITORY_OWNER_PART_SLUG) || '' }}
44+
cache-from: type=registry,ref=ghcr.io/${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG }}/albert-docs/api:${{ env.GITHUB_REF_SLUG }}
45+
cache-to: type=inline
46+
build-args: |
47+
PRODUCTION="true"
48+
GITHUB_SHA=${{ github.sha }}

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ jobs:
2222
with:
2323
node-version: "20"
2424
cache: "yarn"
25+
2526
- name: Install dependencies
2627
run: |
2728
yarn --immutable
2829
- name: Lint
2930
run: |
31+
cd app
32+
yarn
3033
yarn lint
3134
3235
# docker:

.github/workflows/testing.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Node.js
2121
uses: actions/setup-node@v4
2222
with:
23-
node-version: "18"
23+
node-version: "20"
2424
cache: "yarn"
2525
- name: Install dependencies
2626
run: |
@@ -30,4 +30,5 @@ jobs:
3030
yarn build
3131
- name: Test code
3232
run: |
33+
cd app
3334
yarn test

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

3+
.next
4+
node_modules
5+
out
6+
packages/albert-ts/dist/
7+
packages/api/dist/
8+
39
# dependencies
410
/node_modules
511
/.pnp

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
20

Dockerfile.api

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM node:20-alpine as builder
2+
3+
WORKDIR /app
4+
5+
ADD . .
6+
7+
RUN yarn && yarn build && yarn --production && yarn cache clean
8+
9+
CMD ["npx", "tsx", "packages/api"]

Dockerfile.app

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:20-alpine as builder
2+
3+
WORKDIR /app
4+
5+
ADD . .
6+
7+
RUN yarn && yarn build && yarn --production && yarn cache clean
8+
9+
FROM ghcr.io/socialgouv/docker/nginx:8.2.3
10+
11+
COPY --from=builder /app/app/out /usr/share/nginx/html/

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
![GitHub last commit (branch)](https://img.shields.io/github/last-commit/betagouv/albert-docs/main)
44
![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/betagouv/albert-docs)
55

6-
Minimalist UI for [albert-API](https://github.com/etalab-ia/albert-api/). Drop documents and query them with LLM.
6+
## Packages
7+
8+
| Name | descriptions |
9+
| ------------------ | ----------------------------------------------------------------------------------------------------------------- |
10+
| app | Minimalist UI for [albert-API](https://github.com/etalab-ia/albert-api/). Drop documents and query them with LLM. |
11+
| packages/albert-ts | Browser/Node utils for albert API |
12+
| packages/api | A basic API to query a collection |
713

814
## Start
915

0 commit comments

Comments
 (0)