Repository navigation
Code Management
We will use standardized camelCase for identifier names
- Use Camel Case for naming variables and functions.
- Start with a lowercase letter, and capitalize each subsequent word.
- Event-handling functions should be prefixed with
on, followed by the event they handle.
Examples:
let userName = "John Doe";
function calculateTotalAmount() {
// function logic
}
function onClick() {
// handle click event
}- Always put spaces around operators ( = + - * / ), and after commas:
Examples:
let x = x + 1;
const myArray = ["apple", "banana", "pineapple"];- Always use
tabor 2 spaces for indentation of code blocks (indent using spaces in VSCode, which is default):
Examples:
function onSubmit() {
//4 spaces
}To ensure efficient issue tracking and maintain a focused development process, we follow these guidelines:
What constitutes an Issue?
Issues should represent significant items that require discussion, planning, and potentially substantial work. Examples include:
- User Stories: Descriptions of user needs and desired functionality.
- Critical Bugs: Errors that severely impact application functionality or user experience.
- Feature Proposals: Suggestions for new features or major enhancements.
Managing Smaller Tasks
For smaller tasks that contribute to a larger issue, we encourage the use of comments within the relevant issue. This keeps related work organized and avoids cluttering the issue tracker with minor items.
How to List Tasks in Comments:
This table demonstrates how to break down a larger issue into smaller, manageable tasks within a GitHub issue comment.
| Status | Task Name | Description | Assigned To |
|---|---|---|---|
| ☐ | Design Login Form | Create the HTML structure and basic styling for the login form. | @octocat |
| ⏳ | Implement Input Validation | Add client-side validation for email and password fields. | @defunkt |
| ☑ | Connect to Backend API | Integrate the login form with the backend API for authentication. | @github |
| 🚫 | Add Error Handling | Implement error handling for invalid credentials and network issues. | @octocat |
| ☐ | Write Unit Tests | Write comprehensive unit tests for the login functionality. | @defunkt |
| ☑ | Update Documentation | Update the project documentation with details about the new login feature. | @github |
Explanation of Status Symbols:
- ☐ Not Started
- ⏳ In Progress
- ☑ Completed
- 🚫 Blocked
How to Use This in a GitHub Comment:
Simply copy and paste this Markdown table into a GitHub issue comment. GitHub will automatically render it as a formatted table. You can then edit the checkboxes, task names, descriptions, and assigned contributors directly within the comment.
Our project utilizes a simple and consistent branching model:
-
main: This branch represents the production-ready code deployed to the public. It must always be stable, bug-free, and deployable. -
dev: This branch serves as the integration branch for all new features and changes before release. Workflow:
-
Create a new feature branch (e.g.,
feature/new-login) fromdev.Note: It is highly recommended to prefix branch names with a commit type followed by a forward slash. This helps categorize branches and makes it easier to understand their purpose. Examples:
feature/,bugfix/,refactor/,docs/. See below for a list of common commit types. -
Develop and commit changes within the feature branch.
-
Create a Pull Request (PR) targeting the
devbranch. -
After code review and approval, merge the feature branch into
dev. -
Delete the feature branch.
-
When ready for release, merge
devintomain.
This workflow ensures a clean and manageable codebase, facilitating continuous integration and deployment.
To maintain a clear and traceable project history, we follow these conventions:
Linking to Issues:
All commits and Pull Requests (PRs) must be linked to a relevant issue using #issue_number (e.g., #123). This automatically connects the commit/PR to the issue on GitHub, providing a clear audit trail.
Commit Message Format:
Use the following format for commit messages:
<type>(<scope(optional)>): <short description>
<longer description (optional)>
Commit Types:
-
feat: A new feature -
fix: A bug fix -
docs: Documentation changes -
style: Code style changes (formatting, whitespace, etc.) -
refactor: Code refactoring (no new features or bug fixes) -
test: Adding or correcting tests -
chore: Other minor changes (dependencies, etc.) -
ci: Changes to CI configuration -
build: Changes to build process/dependencies -
perf: Performance improvements
Example:
feat(user-authentication): Implement password reset Added password reset functionality via email.
Breaking Changes:
Indicate breaking changes with ! after the type/scope (e.g., feat!: ...) or by adding BREAKING CHANGE: to the commit message footer.
Benefits:
These conventions ensure clear communication, facilitate changelog generation, and improve project maintainability.
We decided to develop using the industry standard VS-Code environment as it offers great versatility when it comes to extensions, plugins and version control integration.
Our project directory is organized in 2 main sections each representing the two main services that make up our application. They are split into front-end and back-end. The back-end also includes the database code since it is logical to associate those services together.
For the front-end we utilize the React frameworks directory structure organization which places pages in a folder of their own and also separates page components from everything else as well. This improves modularity as we can simply reference any component on any page we would like. Finally, we have a separate folder for all of our friend-end testing using JEST.
We are designing a RESTful web application. We plan on employing all the requirements of the RESTful design pattern when it comes to the implementation of our backend API. This will allow us to properly process and handle any incoming and outgoing requests from our servers. The requests will be formatted according to standard conventions (GET, POST, DELETE) with headers and any parameters we require. We will also be implementing RESTful Authentication where we pass the access control to the token bearer in order to authenticate specific requests to resources.
Currently we are implementing a protected route strategy. We also plan on enforcing security through the use of Auth0 with JSON Web Tokens (JWT). When a user makes a request to a protected route it will pass control to the bearer to authenticate via a token that was assigned when the user securely logged into our system and was confirmed trustworthy.
For our logging infrastructure we will be using PostHog as it provides detailed insights into user behaviour, is easy to integrate, and offers custom events tracking. It also has great documentation for any custom metrics we wish to track and great visualization tools for those metrics.
Another possible exploration would be using Heap which is a promising user logging tool. Considerations involving pricing and actual utility for our specific use case will be analyzed in the future.
We will use the Sentry platform for the error handling infrastructure of our application. Sentry is a easy to use tool that maximizes efficiency when it comes to logging, analyzing and tracing errors back to the source. Sentry is also a useful tool when it comes to general purpose logging and monitoring the performance of your application. Finally Sentry has extensive documentation on how to integrate their tool within a project seamlessly.
Additional benefits include alerts, tracing errors to the suspect commit that caused them, error analytics, breadcrumbs, session replays and much more.
Sentry tracks common application performance metrics such as throughput, latency, page loading time, memory usage and leaks. It also allows you to triage underperforming services by offering analytics and any possible related errors linked to poor performance.