Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Milestone1 - User authentication + database #1

Merged
merged 69 commits into from
Nov 23, 2024
Merged

Conversation

Duta-Sebastian
Copy link
Owner

@Duta-Sebastian Duta-Sebastian commented Nov 3, 2024

Title
Implement Database Connections, User Authentication, and Logging

Description

Database Connections and Authentication:
Implemented the core logic for connecting to the database and handling user authentication.
Added integration tests for login functionality to verify database interactions and authentication logic.

Logger Class:
Created a logger class to manage application logs, with each app session generating a new log file.
The logger captures various information to aid in debugging and monitoring.

Testing:
Added unit tests for the password hashing function to ensure security and functionality.
Created integration tests for login logic to validate the end-to-end authentication process.

Rationale
These changes establish the foundational components of database connectivity, user authentication, and logging. The unit and integration tests enhance code reliability and maintainability by ensuring critical functions are working as expected.

Both classes are singletons and should be instantiated on startup. The EnvironmentReader deals with the .env file and retrieves the connection string ( as it should not be plainly available in code ) and the Database class creates the app-wide connection string.
…eals with initializing all the database tables if they haven't already been created.

Implemented a wrapper so the environment setting and getting is not os-specific
- Implemented a logger that records significant actions within the application
- Includes timestamped entries for better debugging and monitoring
- Logs are saved in a dedicated "Logs" directory
…rom the cmakelist + some small warning removing.
Moved all application files to the src directory and created a new directory for unittests. Each has a separate makefile.
Copy link
Collaborator

@MaximTiberiu MaximTiberiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved.

@Duta-Sebastian Duta-Sebastian merged commit 68a708b into main Nov 23, 2024
8 checks passed
@Duta-Sebastian Duta-Sebastian deleted the Milestone1 branch November 23, 2024 21:48
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