Skip to content

Implement local authentication and enhance onboarding process#388

Open
victalejo wants to merge 22 commits into
monoscope-tech:masterfrom
victalejo:master
Open

Implement local authentication and enhance onboarding process#388
victalejo wants to merge 22 commits into
monoscope-tech:masterfrom
victalejo:master

Conversation

@victalejo
Copy link
Copy Markdown
Contributor

This pull request implements user authentication and registration features, adds internationalization (i18n) support, and introduces a production-ready Docker Compose setup. The most significant changes are the addition of new user fields and authentication logic, frontend pages for login and registration, and the integration of language selection and translation in the user interface.

Authentication & User Model Enhancements:

  • Extended the User data model to include passwordHash, companyName, companySize, and foundUsFrom fields, and updated all relevant queries and insertions to use these new fields. Added helper functions for setting user passwords and counting users. [1] [2] [3]
  • Added a new Session field to store the user's selected language.

Frontend Pages & Internationalization:

  • Introduced Pages.Auth with fully internationalized login and registration HTML forms, including logic for first-user registration and language switching.
  • Updated navigation and page wrappers to use the selected language for menu items and settings, integrating the i18n module throughout the UI. [1] [2] [3]

Project Structure & Dependencies:

  • Registered the new modules (Pages.Auth, Web.I18n) in monoscope.cabal for both library and web components. [1] [2]

Production Deployment:

  • Added a docker-compose.prod.yml file for production deployments, including a TimescaleDB service and the application, with environment variables and health checks.
  • Created a new Dockerfile.local for a self-contained build, including all dependencies and frontend assets, suitable for local or production use.

Database Query Updates:

  • Updated all queries that fetch users to include the new fields, ensuring consistency across the codebase.

These changes lay the groundwork for secure user authentication, improved user onboarding, and a more flexible, internationalized user experience.

victalejo and others added 21 commits May 15, 2026 19:50
fix(cabal): update cabal version and metadata for consistency
fix(package): correct GitHub repo and update license information
…n forms

- Added a new Docker Compose configuration for production with TimescaleDB.
- Introduced local authentication support, allowing users to register and log in with email and password.
- Updated user model to include a password hash for local authentication.
- Created registration and login pages with appropriate forms and validation.
- Implemented language support for English and Spanish in authentication messages.
- Added database migration to accommodate the new password hash field in the users table.
- Enhanced session management to support local authentication and language preferences.
fix(vite): update asset file name handling for Vite >=6
@tonyalaribe
Copy link
Copy Markdown
Contributor

tonyalaribe commented May 20, 2026

Hi @victalejo, thanks for the PR.

I recommend opening issues for the different items so the details can be agreed on before an implementation.

Eg, I'm not eager to add auth yeah, beyond the existing basic auth, but that can change if you share your motivation.

Also about internationalization. Its a huge commitment, so I would like to understand the motivation

@victalejo
Copy link
Copy Markdown
Contributor Author

Hi @tonyalaribe, Thanks for the feedback! I've been using Monoscope and it's become part of my daily workflow — that's exactly why I want to contribute: I'm invested in seeing it grow.
On auth / 2FA: The motivation is simple — this is where all your app's errors live. If it's exposed, it's a target. I'd like to add 2FA as an optional layer for users who want tighter security, without changing the existing basic auth flow.
On internationalization: My immediate goal is Spanish (my native language). I'm not proposing a full i18n overhaul — just the groundwork so other languages can be added later via issues/community requests, rather than hardcoding everything in English.
I'll open separate issues for each so we can discuss the details before any implementation. And yes — I'd love to be an active maintainer if that aligns with your vision for the project.

@tonyalaribe
Copy link
Copy Markdown
Contributor

Hi @victalejo, so thanks for clarifying. I would like the auth topic yo be a separate PR, and we could focus on internationalization for this PR.

Can the per language configure be yaml? So we can have one yaml per language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants