|
1 | | -# Actumatic |
| 1 | +# 📰 Actumatic |
2 | 2 |
|
3 | | -Website to show last headlines of most famous news tech websites. |
| 3 | +### Aggrégateur d'actualités numériques et technologiques |
| 4 | + |
| 5 | +Site web regroupant toutes les actualités tech francophones en temps réel par aggrégation de flux RSS. |
| 6 | + |
| 7 | +🌱 Développé en clean architecture avec le gestionnaire de monorepo `nx`. |
| 8 | + |
| 9 | +- Stack backend : Nest.js, Prisma, Jest |
| 10 | + |
| 11 | +- Stack frontend : React, Redux Toolkit, Mantine, Vitest |
4 | 12 |
|
5 | 13 | ## Setup |
6 | 14 |
|
7 | | -- Install Postgresql and Node. |
8 | | -- Create .env file based on .env.exemple and fill DATABASE_URL. |
9 | | -- Install dependancies : |
| 15 | +Installer Postgresql et Node.js (ou utiliser Docker, voir ci-dessous) |
| 16 | + |
| 17 | +Créer le fichier `.env` à partir du `.env.exemple` et modifiez la variable `DATABASE_URL` |
| 18 | + |
| 19 | +Installer les dépendances : |
10 | 20 |
|
11 | 21 | ```sh |
12 | 22 | npm install |
13 | 23 | ``` |
14 | 24 |
|
15 | | -- Create database and run migration : |
| 25 | +Créer la base de donnée et lancer la migration : |
16 | 26 |
|
17 | 27 | ```sh |
18 | | -# Create database |
19 | 28 | createdb actumatic |
20 | | - |
21 | | -# Run prisma migrations |
22 | 29 | npx prisma migrate dev |
23 | 30 | ``` |
24 | 31 |
|
25 | | -## Run tasks |
| 32 | +## Lancement |
26 | 33 |
|
27 | | -To run the dev server, use: |
| 34 | +Lancer le back et le front en mode dev : |
28 | 35 |
|
29 | 36 | ```sh |
30 | 37 | npm run backend:start |
31 | 38 | npm run frontend:start |
32 | 39 | ``` |
33 | 40 |
|
34 | | -To run both front & back in same command with : |
| 41 | +Pour build : |
35 | 42 |
|
36 | 43 | ```sh |
37 | | -npm run start |
| 44 | +npm run backend:build |
| 45 | +npm run frontend:build |
38 | 46 | ``` |
39 | 47 |
|
40 | | -To create a production bundle of frontend: |
| 48 | +## Docker |
| 49 | + |
| 50 | +Préparer les fichiers secrets : |
41 | 51 |
|
42 | 52 | ```sh |
43 | | -npx nx build frontend |
| 53 | +secrets/postgres_user # nom d'utilisateur postgres |
| 54 | +secrets/postgres_password # mot de passe postgres |
| 55 | +secrets/postgres_db # nom de la base de données dédiée au projet |
| 56 | +secrets/database_url # url d'accès (idem .env) |
44 | 57 | ``` |
| 58 | +Modifier si besoin les ports dans le `compose.yaml` |
45 | 59 |
|
46 | | -To see all available targets to run for a project, run: |
47 | | - |
| 60 | +Puis lancer docker depuis le répertoire du projet : |
48 | 61 | ```sh |
49 | | -npx nx show project frontend |
50 | | -``` |
| 62 | +docker compose up -d |
| 63 | +``` |
0 commit comments