Commit Graph
222 Commits
Author SHA1 Message Date
Florian Sylvain 777666a92f clean: removed unwanted build file 2023-10-16 10:02:04 +02:00
Florian Sylvain 55d9e3bfc1 clean: english
The changes in this commit were made to translate the website's text content from French to English, as part of efforts to ensure the platform is more accessible to a wider audience. This includes translation of user-facing instructions, button labels, form fields, and messages across multiple templates including home.html, setup1.html, setup2.html, and login.html among others.
2023-10-16 09:47:04 +02:00
Florian Sylvain 7d071ebc2e clean: refactor templates to use a common head section
This commit introduces a refactoring in various page templates to use a central, common 'head' section, stored under utilsHead.html. This head section contains common metadata, styles, and scripts. This change enhances code reusability and standardizes the head section across different pages for consistent user experience and ease of future potential changes. Also, some minimal adjustments were made in the navigation and link routing for more user-friendly URL paths. Lastly, the server's listening interface was updated to only listen on the localhost.
2023-10-11 20:28:00 +02:00
Florian Sylvain c2b64bf0fa feat: post pages placeholders + tinymce lib 2023-09-06 04:48:16 +02:00
Florian Sylvain ea942355ab feat: templ_static_files_validator
super_build.bat script was removed because it became unnecessary after transitioning to a Docker-based build process which provides cross-platform build capability more efficiently (and Windows scripting sucks). Also added templ_static_files_validator.sh that validates existence of files linked in HTML within the specified directory. Can be useful when working on frontend to make sure static files will load properly.
2023-09-06 04:36:14 +02:00
Florian Sylvain e113c79a6d fix: all remaining "article" replaced by "post"
All instances of the term "article" were replaced with "post" in variable names, type names, function names, etc. This was primarily to ensure consistent naming and reduce confusion going forward. The term "post" was chosen as it's a more commonly used term for the involved operations in the context of content management and blogging platforms. All tests were also updated to reflect these changes.
2023-09-06 03:38:52 +02:00
Florian Sylvain 509329951f clean: Article to Post in post.go
Changes was made to keep consistency in terminology across the application.
2023-09-06 03:32:44 +02:00
Florian Sylvain 5bd4b4769f feat: Posts page impl and associated routes
Implemented a new 'Posts' page which has been added to the main navigation. This includes:
- Adding the 'posts.html' template with basic HTML and related CSS/JS
- Updating the 'componentNavbar.html' template to include a link to the new Posts page
- Writing the 'GetPostsPage' function in 'api/page.go' to handle requests for the Posts page
- Modifying the 'home.html' template to provide a link towards the Posts Page
- Adding an associated route in 'api/page.go'.
2023-09-06 02:20:27 +02:00
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