Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
65520f6
fix bug build next
Alexandre78R Oct 9, 2024
9ad7929
Merge pull request #156 from Alexandre78R/backend/frontend/captcha-lang
Alexandre78R Oct 9, 2024
418cc7b
add env build frontend
Alexandre78R Oct 9, 2024
f4337a7
Merge pull request #157 from Alexandre78R/backend/frontend/captcha-lang
Alexandre78R Oct 9, 2024
efc0cf0
update cd ;env prod key secret github api backend
Alexandre78R Oct 9, 2024
78db8d3
Merge pull request #158 from Alexandre78R/backend/frontend/captcha-lang
Alexandre78R Oct 9, 2024
54284b9
new cd github action
Alexandre78R Oct 9, 2024
531c8c6
Merge pull request #159 from Alexandre78R/backend/frontend/captcha-lang
Alexandre78R Oct 9, 2024
1c4d76b
new cd github action
Alexandre78R Oct 9, 2024
1d3c273
Merge pull request #160 from Alexandre78R/backend/frontend/captcha-lang
Alexandre78R Oct 9, 2024
29a6715
fixed cd github action variable secrets buildx
Alexandre78R Oct 9, 2024
362e55e
Merge pull request #161 from Alexandre78R/backend/frontend/captcha-lang
Alexandre78R Oct 9, 2024
e69739f
add fixed dockerfile vps new game
Alexandre78R Oct 9, 2024
39730b4
Merge pull request #162 from Alexandre78R/backend/frontend/captcha-lang
Alexandre78R Oct 9, 2024
ba85042
add env build frontend
Alexandre78R Oct 9, 2024
fa9bf92
Merge pull request #163 from Alexandre78R/backend/frontend/captcha-lang
Alexandre78R Oct 9, 2024
a23b716
add security api tocken email send
Alexandre78R Oct 22, 2024
88c6d8b
Merge branch 'dev' of github.com:Alexandre78R/portfolio into backend/…
Alexandre78R Oct 22, 2024
87e44b0
delete graphql contact test query
Alexandre78R Oct 22, 2024
98be720
clear code
Alexandre78R Oct 22, 2024
a534c39
add entity skill and skillsubitem
Alexandre78R Oct 22, 2024
b7c137e
fix entity skillsubitem
Alexandre78R Oct 22, 2024
9f0f26e
add entity project
Alexandre78R Oct 23, 2024
7801996
add entity experience
Alexandre78R Oct 23, 2024
19d74bb
add entity education
Alexandre78R Oct 23, 2024
c2c891c
fixed type data colonne table experience entity
Alexandre78R Oct 23, 2024
094a3b8
delete user data
Alexandre78R Oct 23, 2024
61afb6e
udate rules caract table education
Alexandre78R Oct 23, 2024
2c148e3
update rules caract table project
Alexandre78R Oct 23, 2024
83f454d
update rules caract table experience
Alexandre78R Oct 23, 2024
d995db6
disable DockerHub Ci/CD policy reform DockerHub
Alexandre78R Feb 11, 2025
c9cae63
update cd main and dev
Alexandre78R Feb 11, 2025
23f2d74
update cd main and dev
Alexandre78R Feb 11, 2025
aeed99b
fixed name docker compose
Alexandre78R Feb 11, 2025
c38d3ed
add fix css carrer and tailwind v4
Alexandre78R Feb 11, 2025
fd5f84e
add type backend skill
Alexandre78R Feb 14, 2025
4543f9f
add update date en not jx and finish resolver skill
Alexandre78R Feb 14, 2025
be60e19
update data
Alexandre78R Feb 14, 2025
a573805
add project data backend
Alexandre78R Feb 14, 2025
be839d5
delete node package docker
Alexandre78R Feb 14, 2025
2862629
Merge branch 'Backend/frontend/api' of https://github.com/Alexandre78…
Alexandre78R Feb 14, 2025
38cb374
update secure api key
Alexandre78R Feb 26, 2025
2eea5f3
add resolver experience
Alexandre78R Feb 26, 2025
3ec20d3
rename resolver all
Alexandre78R Feb 26, 2025
a4c2ee3
fixed experience and delete user no use
Alexandre78R Feb 26, 2025
3f77e3c
generate codegen typage all resolver
Alexandre78R Feb 27, 2025
231930e
switch codegen.ts in to codegen.yml , use fonctionnel apikey security…
Alexandre78R Feb 27, 2025
879519e
switch codegen.ts in to codegen.yml , use fonctionnel apikey security…
Alexandre78R Feb 27, 2025
6d59e93
delete codegen.ts frontend
Alexandre78R Feb 27, 2025
58f2c29
add request list project frontend codegen
Alexandre78R Feb 28, 2025
0a9261b
use codegen get project list page home in to slice redux
Alexandre78R Feb 28, 2025
21bb270
add query get skill fixed codegen backend frontend
Alexandre78R Feb 28, 2025
dcc0582
update slice skill , modify page home data skillList and delete fake …
Alexandre78R Feb 28, 2025
c388b33
add request graphql querry experience and education frontend, fixed b…
Alexandre78R Feb 28, 2025
8abc9dd
update slice experience and education , modify page home gestion data…
Alexandre78R Feb 28, 2025
8bc985e
install prisma add config shema.prisma database
Alexandre78R Mar 4, 2025
4d97d22
update prisma in to src, created commande prisma package.json racine …
Alexandre78R Mar 4, 2025
5168caf
add script seed backend data skill project, add commande package json…
Alexandre78R Mar 5, 2025
ad6fe55
fixed dockerfile backend replace server version 16 in to 18
Alexandre78R Mar 5, 2025
aa8a3ee
fixed envirenoment dev and prod databases_url (url linux or windows) …
Alexandre78R Mar 5, 2025
ca03440
fixed MySQL data gitignore
Alexandre78R Mar 6, 2025
8adbcdc
clean resolver and entity backend projet and skill
Alexandre78R Mar 6, 2025
dcaa695
clear code forntend backend resolver project
Alexandre78R Mar 6, 2025
b8db634
add model experience and education prisma and clear code
Alexandre78R Mar 6, 2025
5fa2c4e
update seed fake data experience and education
Alexandre78R Mar 6, 2025
4e4f295
clear code and resolver education experience
Alexandre78R Mar 6, 2025
b5e5ee1
add project by id resolver
Alexandre78R Mar 10, 2025
2a4b3db
add created project resolver
Alexandre78R Mar 11, 2025
b52f1dc
add edit project resolver
Alexandre78R Mar 11, 2025
898be1d
add delete project resolver add add structured response backend statu…
Alexandre78R Mar 11, 2025
321ff99
add created skillsubitem and skillcategory resolver, upgrade sructure…
Alexandre78R Mar 12, 2025
58dddaa
add edit skillsubitem and skillcategory resolver, upgrade structure b…
Alexandre78R Mar 12, 2025
9581f75
add delete skillsubitem and skillcategory resolver
Alexandre78R Mar 12, 2025
804fd94
add search by id education
Alexandre78R Mar 13, 2025
ed953f4
add create education
Alexandre78R Mar 13, 2025
291aa23
add edit education
Alexandre78R Mar 13, 2025
e637499
add delete education
Alexandre78R Mar 13, 2025
90fe91d
fixed list education code erreur status and update data frontend request
Alexandre78R Mar 13, 2025
a8f8f8b
add resolver list and by id experience prisma and modify frontend data
Alexandre78R Mar 14, 2025
12d57b2
add resolver created experience prisma and modify entity experience b…
Alexandre78R Mar 14, 2025
72b0b8d
add resolver edit experience
Alexandre78R Mar 14, 2025
933725c
add delete experience
Alexandre78R Mar 14, 2025
1f4a907
delete bdd postgres sql by docker
Alexandre78R Mar 14, 2025
198d444
add script clean bdd prisma
Alexandre78R Mar 18, 2025
0805920
add model user prisma and modify scrip prisma seed and clean
Alexandre78R Mar 19, 2025
fc1473e
add user entity and resolver and userlsit
Alexandre78R Mar 19, 2025
94bcbd9
add resolver register accont, update fonction sendEmail, add text and…
Alexandre78R Mar 19, 2025
893c3c7
add change password resolver user
Alexandre78R Mar 20, 2025
6aba34a
add login user and jwt
Alexandre78R Mar 20, 2025
1ff12d5
add reponse cokkie and check info user request
Alexandre78R Mar 20, 2025
ad86eec
add logout user resolver
Alexandre78R Mar 20, 2025
a079182
fixed env
Alexandre78R Mar 20, 2025
3142334
add security all resolver for check login and check role, add authche…
Alexandre78R Mar 20, 2025
f182c04
add security all resolver education for check login and check role
Alexandre78R Mar 20, 2025
64bd224
add security all resolver experience for check login and check role
Alexandre78R Mar 20, 2025
460686d
add security all resolver project for check login and check role
Alexandre78R Mar 20, 2025
6e34ca3
add security all resolver skill for check login and check role
Alexandre78R Mar 21, 2025
db1bdaf
add AminResolver and add resolver generateDatabaseBackup is admin
Alexandre78R Mar 25, 2025
e317373
delete file bdd.sql
Alexandre78R Mar 25, 2025
2405e90
add admin resovler all stats bdd
Alexandre78R Mar 25, 2025
0e5957c
update generateDatabaseBackup for extend nmber generate bdd.sql and a…
Alexandre78R Mar 25, 2025
f14231d
add fonction resolver delete backup online admin
Alexandre78R Mar 25, 2025
055e37f
add version 1 generate logo skill backend dynamic
Alexandre78R Mar 26, 2025
7a44cba
add router dynamic vidoe/image for project
Alexandre78R Mar 27, 2025
331dc3a
add test resolver user (register)
Alexandre78R Apr 1, 2025
6c545c6
add test resolver user (login)
Alexandre78R Apr 1, 2025
87afb3c
add test resolver user (userList)
Alexandre78R Apr 2, 2025
ecc147e
add test resolver user (changePassword)
Alexandre78R Apr 2, 2025
4eec986
add test resolver user (logout)
Alexandre78R Apr 2, 2025
984ed30
add test resolver skill (createSkill)
Alexandre78R Apr 3, 2025
90c659c
add test resolver skill (createCategory)
Alexandre78R Apr 3, 2025
e7daa6b
add test resolver skill (updateCategory)
Alexandre78R Apr 3, 2025
7b792d3
add test resolver skill (updateSkill)
Alexandre78R Apr 3, 2025
da9209d
add test resolver skill (deleteCategory)
Alexandre78R Apr 4, 2025
cb50fc3
add test resolver skill (deleteSkill)
Alexandre78R Apr 4, 2025
90b6fc1
add test resolver skill (skillList)
Alexandre78R Apr 4, 2025
8c5e2ba
delete resolver generateimage
Alexandre78R Apr 4, 2025
6c5579d
add test resolver project (createProject)
Alexandre78R Apr 8, 2025
4410f16
add test resolver project (updateProject)
Alexandre78R Apr 8, 2025
48b7bba
add test resolver project (deleteProject)
Alexandre78R Apr 9, 2025
3806f19
add test resolver project (projectList)
Alexandre78R Apr 9, 2025
ede3aa7
add test resolver project (projectById)
Alexandre78R Apr 9, 2025
4e5a2ce
add test resolver education (createEducation)
Alexandre78R Apr 10, 2025
78c9e89
add test resolver education (updateEducation)
Alexandre78R Apr 10, 2025
04fcc00
add test resolver education (deleteEducation)
Alexandre78R Apr 10, 2025
3ae9be8
add test resolver education (educationList)
Alexandre78R Apr 11, 2025
003634c
add test resolver education (educationById)
Alexandre78R Apr 11, 2025
be59100
add test resolver experience (createExperience)
Alexandre78R Apr 11, 2025
6c4442c
add test resolver experience (updateExperience)
Alexandre78R Apr 15, 2025
e37b9d3
add test resolver experience (deleteExperience)
Alexandre78R Apr 15, 2025
16a2ab9
fixed docker file frontend
Alexandre78R Apr 15, 2025
d2e084a
add test resolver experience (experienceList)
Alexandre78R Apr 15, 2025
e3787ce
add test resolver experience (experienceById)
Alexandre78R Apr 15, 2025
1cbb589
add test resolver captcha (generateCaptcha)
Alexandre78R Apr 16, 2025
b76df94
add test resolver captcha (validateCaptcha)
Alexandre78R Apr 16, 2025
708da1e
add test resolver captcha (deleteCaptcha)
Alexandre78R Apr 16, 2025
83eae8c
add test resolver contact (sendContact)
Alexandre78R Apr 17, 2025
c88f06f
add test routes dynamic images
Alexandre78R Apr 17, 2025
bffa01b
add test routes upload get video and images
Alexandre78R Apr 18, 2025
7bd6b8a
add test routes badge-project get badge number , is versioning 1.0 te…
Alexandre78R Apr 18, 2025
01966d8
add test resolver admin (generateDatabaseBackup)
Alexandre78R Apr 22, 2025
c495771
add test resolver admin (generateDatabaseBackup) fixed resolver admin
Alexandre78R Apr 22, 2025
f0c91b2
add test resolver admin (listBackupFiles)
Alexandre78R Apr 23, 2025
8d9a919
add test resolver admin (listBackupFiles) delete sql bdd
Alexandre78R Apr 23, 2025
b2ad1d8
add test resolver admin (deleteBackupFiles)
Alexandre78R Apr 24, 2025
c7b9057
add test resolver admin (getGlobalsStas)
Alexandre78R Apr 24, 2025
87e55d8
add test lib generatedSecurePassword
Alexandre78R Apr 25, 2025
646a749
add test lib customAuthChecker
Alexandre78R Apr 25, 2025
203567b
add test lib generateBadgeSvg
Alexandre78R Apr 29, 2025
4dceed5
add test lib logoloader
Alexandre78R Apr 29, 2025
afd9aa9
add test mail sendEmail
Alexandre78R Apr 30, 2025
acad86b
add test mail structureMail
Alexandre78R May 1, 2025
169e4df
Merge pull request #165 from Alexandre78R/Backend/frontend/api
Alexandre78R Jun 11, 2025
a55a177
add file bdd.sql for prod
Alexandre78R Jun 11, 2025
c12558e
Merge pull request #166 from Alexandre78R/Backend/frontend/api
Alexandre78R Jun 11, 2025
7474874
fixed image and video category
Alexandre78R Jun 11, 2025
44e2bf1
fix new data skillcategory, and projet add new bdd seed sql
Alexandre78R Jun 11, 2025
8a90aad
Merge pull request #167 from Alexandre78R/fix-bdeploy-app
Alexandre78R Jun 11, 2025
0dbb808
modify dockerfile frontend
Alexandre78R Jun 11, 2025
de5d9ff
fixed bug prod
Alexandre78R Jun 11, 2025
d6793b8
new file sql
Alexandre78R Jun 11, 2025
1a5a03d
Merge pull request #168 from Alexandre78R/fix-bdeploy-app
Alexandre78R Jun 11, 2025
0dbcd3f
fixed captcha and dockerfile frontend mode build one
Alexandre78R Jun 11, 2025
9652050
Merge pull request #169 from Alexandre78R/fix-bdeploy-app
Alexandre78R Jun 11, 2025
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
8 changes: 4 additions & 4 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
POSTGRES_USER=""
POSTGRES_PASSWORD=""
POSTGRES_DB=""
NEXT_PUBLIC_API_TOKEN=""
NEXT_PUBLIC_API_TOKEN=""
JWT_SECRET=""
NODE_ENV=""
NEXT_PUBLIC_API_URL=""
104 changes: 53 additions & 51 deletions .github/workflows/dev-cd.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,74 @@
# .github/workflows/dev-client.yml
name: Compile and push profile APP staging

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
pull_request:
branches: ["dev"]
types:
- closed
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# if pull request merged
if: github.event.pull_request.merged == true

# The type of runner that the job will run on
check-build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Vérifier que Docker Compose fonctionne
run: docker compose version

- name: Tester le build des services
run: |
docker compose -f docker-compose.yml build
continue-on-error: false # Stoppe le workflow si le build échoue

# Steps represent a sequence of tasks that will be executed as part of the job
check-webhook:
needs: check-build # Exécute cette étape seulement si le build a réussi
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Vérifier l'accès au webhook
id: check_webhook
continue-on-error: true
run: |
HTTP_STATUS=$(curl -o /dev/null -s -w "%{http_code}\n" ${{ secrets.WEBHOOK_URL_MAIN }})
echo "Webhook status: $HTTP_STATUS"
if [[ "$HTTP_STATUS" -ne 200 ]]; then
echo "Erreur : Le webhook ne répond pas correctement (HTTP $HTTP_STATUS)."
exit 1
fi
#Deactivation due to new Docker Hub conditions
# - uses: actions/checkout@v4

# login with Docker
- uses: docker/login-action@v2
name: Login to Docker Hub
with:
# generate some credentials from Dockerhub and store them into the repo secrets
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# - uses: docker/login-action@v2
# name: Login to Docker Hub
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

# prepare buildx for docker
- uses: docker/setup-buildx-action@v2
name: Set up Docker Build
# - uses: docker/setup-buildx-action@v2
# name: Set up Docker Build

# build an push the newly created image frontend
- uses: docker/build-push-action@v4
name: Build and push frontend
with:
context: ./frontend
file: ./frontend/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/dev-frontend-portfolio:latest
# - uses: docker/build-push-action@v4
# name: Build and push frontend
# with:
# context: ./frontend
# file: ./frontend/Dockerfile
# push: true
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/dev-frontend-portfolio:latest
# secrets: |
# NEXT_PUBLIC_API_TOKEN=${{ secrets.NEXT_PUBLIC_API_TOKEN }}

# build an push the newly created image backend
- uses: docker/build-push-action@v4
name: Build and push backend
with:
context: ./backend
file: ./backend/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/dev-backend-portfolio:latest
# - uses: docker/build-push-action@v4
# name: Build and push backend
# with:
# context: ./backend
# file: ./backend/Dockerfile
# push: true
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/dev-backend-portfolio:latest

# deployment:
# needs: build
# runs-on: ubuntu-latest
# # send deploiement hook
# steps:
# - name: Invoke deployment hook
# uses: distributhor/workflow-webhook@v3
# with:
# webhook_url: ${{ secrets.WEBHOOK_URL_DEV }}
deployment:
needs: build
needs: [check-build, check-webhook]
runs-on: ubuntu-latest
steps:
- name: Invoke deployment hook
Expand All @@ -77,4 +79,4 @@ jobs:
SIGNATURE=$(echo -n "$PAYLOAD" | openssl dgst -sha1 -hmac "$SECRET_KEY" | sed 's/^.* //')
SIGNATURE="sha1=$SIGNATURE"

curl -X POST -H "Content-Type: application/json" -H "X-Hub-Signature: $SIGNATURE" -d "$PAYLOAD" ${{ secrets.WEBHOOK_URL_DEV }}
curl -X POST -H "Content-Type: application/json" -H "X-Hub-Signature: $SIGNATURE" -d "$PAYLOAD" ${{ secrets.WEBHOOK_URL_DEV }}
90 changes: 49 additions & 41 deletions .github/workflows/main-cd.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,68 @@
# .github/workflows/staging-client.yml
name: Compile and push profile APP staging

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
pull_request:
branches: ["main"]
types:
- closed
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# if pull request merged
if: github.event.pull_request.merged == true

# The type of runner that the job will run on
check-build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Vérifier que Docker Compose fonctionne
run: docker compose version

- name: Tester le build des services
run: |
docker compose -f docker-compose.yml build
continue-on-error: false # Stoppe le workflow si le build échoue

# Steps represent a sequence of tasks that will be executed as part of the job
check-webhook:
needs: check-build # Exécute cette étape seulement si le build a réussi
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Vérifier l'accès au webhook
id: check_webhook
continue-on-error: true
run: |
HTTP_STATUS=$(curl -o /dev/null -s -w "%{http_code}\n" ${{ secrets.WEBHOOK_URL_MAIN }})
echo "Webhook status: $HTTP_STATUS"
if [[ "$HTTP_STATUS" -ne 200 ]]; then
echo "Erreur : Le webhook ne répond pas correctement (HTTP $HTTP_STATUS)."
exit 1
fi

# login with Docker
- uses: docker/login-action@v2
name: Login to Docker Hub
with:
# generate some credentials from Dockerhub and store them into the repo secrets
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
#Deactivation due to new Docker Hub conditions
# - uses: docker/login-action@v2
# name: Login to Docker Hub
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

# prepare buildx for docker
- uses: docker/setup-buildx-action@v2
name: Set up Docker Build
# - uses: docker/setup-buildx-action@v2
# name: Set up Docker Build

# build an push the newly created image frontend
- uses: docker/build-push-action@v4
name: Build and push frontend
with:
context: ./frontend
file: ./frontend/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/main-frontend-portfolio:latest
# - uses: docker/build-push-action@v4
# name: Build and push frontend
# with:
# context: ./frontend
# file: ./frontend/Dockerfile
# push: true
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/main-frontend-portfolio:latest

# build an push the newly created image backend
- uses: docker/build-push-action@v4
name: Build and push backend
with:
context: ./backend
file: ./backend/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/main-backend-portfolio:latest
# - uses: docker/build-push-action@v4
# name: Build and push backend
# with:
# context: ./backend
# file: ./backend/Dockerfile
# push: true
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/main-backend-portfolio:latest

# deployment:
# needs: build
Expand All @@ -66,7 +74,7 @@ jobs:
# with:
# webhook_url: ${{ secrets.WEBHOOK_URL_MAIN }}
deployment:
needs: build
needs: [check-build, check-webhook]
runs-on: ubuntu-latest
steps:
- name: Invoke deployment hook
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode
node_modules
.env
.env
mysql-data
24 changes: 23 additions & 1 deletion backend/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,26 @@ PORT_MAIL=""
AUTH_USER_MAIL=""
AUTH_PASS_MAIL=""
API_KEY=""
BASE_URL=""
BASE_URL=""
JWT_SECRET=""
NODE_ENV=""

# This was inserted by `prisma init`:
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema

# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

# The following `prisma+postgres` URL is similar to the URL produced by running a local Prisma Postgres
# server with the `prisma dev` CLI command, when not choosing any non-default ports or settings. The API key, unlike the
# one found in a remote Prisma Postgres URL, does not contain any sensitive information.

DATABASE_URL=""

# url d'exemple :
# version windows
# DATABASE_URL="mysql://user:password@host.docker.internal:3306/bddname"

#pour linux
# DATABASE_URL="mysql://user:password@172.17.0.1:3306/bddname"
5 changes: 5 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
# Keep environment variables out of version control
.env

/src/generated/prisma
12 changes: 10 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:16-alpine3.14
# FROM node:16-alpine3.14
FROM node:18.18-alpine

RUN apk --no-cache add \
build-base \
Expand All @@ -9,15 +10,22 @@ RUN apk --no-cache add \
musl-dev \
giflib-dev \
librsvg-dev \
mysql-client \
python3

RUN mkdir /app
WORKDIR /app
COPY package.json .
RUN npm i

COPY src/prisma ./src/prisma
RUN npx prisma generate --schema=src/prisma/schema.prisma

COPY src src
COPY codegen.ts .
COPY tests tests
COPY jest.config.ts jest.config.ts

# COPY codegen.ts .

COPY tsconfig.json .

Expand Down
17 changes: 0 additions & 17 deletions backend/codegen.ts

This file was deleted.

14 changes: 14 additions & 0 deletions backend/codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
verbose: true

schema:
- http://localhost:4000/graphql:
headers:
x-api-key: "${API_KEY}"

generates:
./src/types/graphql.ts:
plugins:
- typescript
- typescript-operations
config:
useIndexSignature: true
8 changes: 8 additions & 0 deletions backend/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default {
preset: "ts-jest",
testEnvironment: "node",
moduleFileExtensions: ["ts", "js", "json"],
testMatch: ["**/tests/**/*.test.ts"],
setupFiles: ["dotenv/config"],
transformIgnorePatterns: ["/node_modules/"],
};
Loading