Commit Graph
164 Commits
Author SHA1 Message Date
Florian Sylvain 554fdc1989 clean: Article to Post in domain and related use cases
Renamed the 'Article' domain to 'Post' in order to better reflect the purpose and utility of the object. The change involved renaming all related use cases, classes, and other references from 'Article' to 'Post' and updating all functions and data types to work with Posts instead of Articles.
2023-09-06 01:56:27 +02:00
Florian Sylvain 46491a688b clean: refacto User and Article repos for clarity
Simplified the code for creating and returning user and article entities in userRepository.go and articleRepository.go. Direct function calls to domain.FromDb(...) were replaced with the more descriptive mapping functions mapUserToDomain(...) and mapArticleToDomain(...). This ensures better code readability and understanding and provides a single, consistent way to map database entities to domain entities.
2023-08-17 05:55:31 +02:00
Florian Sylvain d91dc256a2 feat: docker and docker-compose support
Introduced a Dockerfile and compose.yml to allow the application to run inside a Docker container. This removes the need for local system-level dependencies and offers a more predictable environment for the app. README.md was updated to include Docker-related instructions and an additional environment variable `DOCKER_DB_FOLDER` was added on top of existing ones for Docker support.
2023-08-13 23:40:12 +02:00
Florian Sylvain 60e25cea2f fix: set "DB_FILE" environment variable in tests
This commit adds a line to set the "DB_FILE" environment variable in tests. This ensures that tests are always using "test.db" for database related operations, aligning testing environment accurately which guarantees consistent results.
2023-08-13 21:41:04 +02:00
Florian Sylvain a785483220 fix: error messages and modify password validation
This commit enhances the user experience in two ways:

1. The feedback messages within the setup1.html file have been updated for both the username and password fields. The new messages better inform users about the rules for valid input— stating that the username must be 3-20 characters long and the password must contain at least eight characters.

2. The password validation process has been adjusted. Now, only the confirm password field gets marked as invalid when the entered passwords don't match. This helps users understand exactly which field needs correction.
2023-08-13 21:40:17 +02:00
Florian Sylvain b414a07f6d fix: added missing DB_FILE env var 2023-08-13 04:36:48 +02:00
Florian Sylvain 245bf2fbf4 feat: environment specific database handling
Changes have been made to support environment specific database file handling. By introducing a new environment variable "DB_FILE", the application's runtime now reads the database file path from the environment. In addition, subdirectories will now be automatically created if they don't exist and more detailed error messages will be printed in case of a failure. Environment variable setup and project building instructions were also updated in the README file.
2023-08-13 04:34:30 +02:00
Florian Sylvain 64ecbc6995 clean: removed ignored err var declaration 2023-08-13 03:21:47 +02:00
Florian Sylvain c6bd7731cc clean: removed use of "." in imports 2023-08-13 02:48:19 +02:00
Florian Sylvain 2525a64d0a feat: client form validation on register page 2023-08-13 01:42:01 +02:00
Florian Sylvain 04ebbfda87 feat: setup/register flow impl and login refactor 2023-08-13 00:24:50 +02:00
Florian Sylvain 5c61796313 clean: made pageError struct type 2023-08-12 22:38:01 +02:00
Florian Sylvain e575062209 clean: removed too deeply nested tests 2023-08-12 20:52:32 +02:00
Florian Sylvain 1539e06ec8 clean: moved funcs to specific files + GetPage usecase/repo 2023-08-12 20:42:43 +02:00
Florian Sylvain 869fb3f145 fix: home.html to api dir, remove empty style tag 2023-08-12 19:51:22 +02:00
Florian Sylvain 7e8b415cab feat: Add build scripts, refactor for binary embedding 2023-08-12 19:42:27 +02:00
Florian Sylvain 047e14df60 fix: made .env file not mendatory 2023-08-12 02:50:01 +02:00
Florian Sylvain 8faf3f8d9d fix: added env vars 2023-08-12 02:44:41 +02:00
Florian Sylvain 542bcded3e fix: panic on test.db rm err 2023-08-12 02:39:42 +02:00
Florian Sylvain 46daadb8e4 feat: tests (article) 2023-08-12 02:33:40 +02:00
Florian Sylvain 0466da2d4b Merge remote-tracking branch 'origin/main' 2023-08-11 21:12:44 +02:00
Florian Sylvain 318fd0f53a feat: cors origins env var 2023-08-11 21:12:31 +02:00
Florian Sylvain 2ddabe2222 feat: go.yml for GitHub build 2023-08-11 13:57:17 +02:00
Florian Sylvain d953a66f22 feat: env variables introduction 2023-08-11 04:02:18 +02:00
Florian Sylvain 4b918aa2fa feat: GitHub link and style adjustments 2023-08-11 02:05:28 +02:00
Florian Sylvain 7611738b48 feat: style improvements 2023-08-11 01:19:55 +02:00
Florian Sylvain 366ae190ff feat: username recovery on login post 2023-08-11 01:19:40 +02:00
Florian Sylvain 96a64097c4 feat: added *.exe to .gitignore 2023-08-10 23:45:54 +02:00
Florian Sylvain 0c139b1f72 feat: added navbar system with some refactors 2023-08-10 23:44:55 +02:00
Florian Sylvain 209555498f clean: moved http.SetCookie into its own func 2023-08-10 23:43:41 +02:00
Florian Sylvain 61f221e49c cean: fixed html style 2023-08-09 18:20:56 +02:00
Florian Sylvain 1d1adfdfc7 feat: validation on articles 2023-08-09 18:13:03 +02:00
Florian Sylvain 836847e9b2 clean: removed useless usecases declaration 2023-08-09 18:07:31 +02:00
Florian Sylvain e3246e337d clean: merged similar usecases to getUser 2023-08-09 17:06:40 +02:00
Florian Sylvain dad0c906f0 feat: first frontend implementation 2023-08-08 05:14:31 +02:00
Florian Sylvain 91d82b0ad7 feat: logout route 2023-08-07 12:36:54 +02:00
Florian Sylvain f33f53ca76 feat: users & authentication implementation 2023-08-07 12:31:29 +02:00
Florian Sylvain e258dccc1c feat: migrated prisma -> gorm 2023-08-06 19:13:49 +02:00
Florian Sylvain 195c247235 feat: go-chi and first routes setup 2023-08-06 05:00:15 +02:00
Florian Sylvain 5b4b5a8622 clean: first clean archi sandbox implementation 2023-08-05 14:37:53 +02:00
Florian Sylvain 4187f0b2e2 clean: removed .idea and added IDEs specifics to .gitignore 2023-08-02 01:35:48 +02:00
Florian Sylvain 1328758984 clean: removed everything to set up 2.0 2023-08-02 01:31:35 +02:00
Florian Sylvain 9d5345f6bd Merge pull request #21 from Floriansylvain/dev
Updated dependencies to fix security issues
2023-02-21 12:18:40 +01:00
Florian Sylvain 82fc8c8018 Updated dependencies to fix security issues 2023-02-21 12:18:08 +01:00
Florian Sylvain dbf5561614 Merge pull request #20 from Floriansylvain/dev
Multiple refactors and routes improvement
2023-02-07 21:39:00 +01:00
Florian Sylvain 730c2ba599 Merge branch 'master' into dev 2023-02-07 21:38:51 +01:00
Florian Sylvain 11df35953a Refactor Article GET routes 2023-02-07 21:35:09 +01:00
Florian Sylvain 8940dc9bf6 Prevent selection on Articles table 2023-02-07 20:40:11 +01:00
Florian Sylvain e0c366632c Refactor all API related functions 2023-02-07 20:39:36 +01:00
Florian Sylvain ef8f106688 Refactor Article.vue 2023-02-07 18:46:38 +01:00