Commit Graph
100 Commits
Author SHA1 Message Date
Florian Sylvain 411adc02b0 fix: copy .env into container 2023-12-04 15:31:24 +01:00
Florian Sylvain c663bcf4a9 Update: Improved UI and functionality of posts and post-edit pages
This change includes both UI and functionality enhancements in 'posts.html' and 'postEdit.html' within the web templates directory. For posts.html, the caption under the table of posts has been replaced with a paragraph tag for better readability. A more comprehensive redesign has been done on postEdit.html, ensuring a more user-friendly page layout with enhanced post edition capabilities. In addition, minor updates were made to the go.sum and go.mod file as a result of new dependencies and versions required by these changes.
2023-10-31 16:07:45 +01:00
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
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
Florian Sylvain 33e6925dab Cleaning here and there 2023-02-06 18:31:34 +01:00
Florian Sylvain 42909a007d Added outlines style on diverse components 2023-01-25 23:12:35 +01:00
Florian Sylvain 9b4ad81122 Added delete button business 2023-01-19 03:05:16 +01:00
Florian Sylvain a4ee8f90ff Article pagination frontend implementation 2023-01-19 02:30:01 +01:00
Florian Sylvain 94b42d7e34 Added await on postArticle before redirect 2023-01-19 01:00:17 +01:00
Florian Sylvain 587301b119 Fix Articles front before table pagination impl. 2023-01-19 00:54:16 +01:00
Florian Sylvain 0c390be215 Merge pull request #15 from Floriansylvain/feature/database_ops_overhaul
Feature/database_ops_overhaul
2023-01-19 00:29:10 +01:00
Florian Sylvain 1ffc999e1a Solved several pagination problems 2023-01-19 00:19:52 +01:00
Florian Sylvain 3376d88f56 Splat handler in their own files, added pagination 2023-01-18 23:33:34 +01:00
Florian Sylvain c681b5389c Added codes in API responses 2023-01-18 21:00:32 +01:00
Florian Sylvain 245ddbc137 Database related operation files reorganization 2023-01-18 20:55:51 +01:00
Florian Sylvain 0461bb08ef Fixed typo 2023-01-18 20:38:00 +01:00
Florian Sylvain 53b560d63d Added an anecdotal home page 2023-01-18 20:04:12 +01:00
Florian Sylvain 607dfd78a3 Implemented edition mode and success/errors modals 2023-01-18 16:31:25 +01:00
Florian Sylvain 994dd49f6d Added examples for .env 2023-01-18 02:21:50 +01:00
Florian Sylvain 145e21eab1 Merge pull request #8 from Floriansylvain/dev
Deployement ready
2023-01-18 02:10:37 +01:00
Florian Sylvain c090ca8dad Added base url env for API 2023-01-18 01:50:16 +01:00
Florian Sylvain 4fdf75e158 Added base path to env variables 2023-01-18 00:45:41 +01:00
Florian Sylvain 5b91962952 Removed hardcoded 'http' in urls 2023-01-13 17:36:26 +01:00
Florian Sylvain 416d91a0e6 Fix URLs tentative 2023-01-13 17:30:46 +01:00
Florian Sylvain 2045c08bd8 Removed base because ff 2023-01-13 16:52:55 +01:00
Florian Sylvain 5cfea64ebf Fixed port .env usages 2023-01-13 16:29:00 +01:00
Florian Sylvain 6dcd8f234b Fixed build prod path option 2023-01-13 16:13:14 +01:00
Florian Sylvain db5c9a925b Changed build file tree 2023-01-13 16:07:24 +01:00
Florian Sylvain 754ce61f2c Now using Tabulator for tables 2023-01-13 02:59:18 +01:00
Florian Sylvain a184154ad1 Merge pull request #7 from Floriansylvain/feature/JWThttpOnly
Feature/jwt_httpOnly
Fix for #6
2023-01-12 11:12:45 +01:00
Florian Sylvain 9721532423 Final httpOnly JWT token implementation front+back 2023-01-12 11:09:12 +01:00
Florian Sylvain 200efe0e90 First part of httpOnly JWT cookie implementation 2023-01-12 00:04:26 +01:00
Florian Sylvain a09ae668ce very basic improvements over article home page 2023-01-09 19:36:25 +01:00
Florian Sylvain d068fcc677 Update README.md 2023-01-09 17:44:54 +01:00
Florian Sylvain a83cff619a TEMP Article page implementation 2023-01-09 17:38:10 +01:00
Florian Sylvain 71e305766c Article GET route now returns Array 2023-01-09 17:37:22 +01:00
Florian Sylvain c818e15aff Article creation inputs improved again 2023-01-09 17:23:09 +01:00
Florian Sylvain 29255c047a Article creation overhaul 2023-01-09 12:03:03 +01:00
Florian Sylvain 408686a644 Fixed old filters and improved error details 2023-01-09 11:59:17 +01:00
Florian Sylvain 8be0059525 Improved Article model 2023-01-09 09:53:33 +01:00
Florian Sylvain 117df6914b Improved new article's id input error 2023-01-07 23:24:53 +01:00
Florian Sylvain a4fb809da4 replace spaces with tabs 2023-01-07 00:10:52 +01:00
Florian Sylvain 4552ca8b1b Added full Article creation pathway 2023-01-07 00:00:40 +01:00
Florian Sylvain 322c77549c Article edition now getting article from DB by ID 2023-01-06 23:28:06 +01:00