-
Notifications
You must be signed in to change notification settings - Fork 1
Vitality Getting Started
This page provides a comprehensive guide to setting up, installing, and working on the Vitality project. Vitality is a centralized telemetry system designed to integrate multiple tools, enabling better debugging, performance tracking, and user experience improvements. Follow the instructions below to get started.
- Install PostgreSQL for your OS.
- Install pgAdmin 4 for your OS.
- Install Node.js using nvm (minimum version 22.11.0).
- Install pnpm using:
Minimum version: 9.15.4.
npm i -g pnpm
-
Open your terminal and type
psql
. -
Use
\du
to list existing roles. -
If
your_name
does not exist, create a role using the following command:CREATE ROLE "your_name" LOGIN PASSWORD 'your_password';
Example:
CREATE ROLE "john_dupon" LOGIN PASSWORD 'awesome_password';
🔴 Note: The
postgres
role should exist by default as a superuser.
- Open pgAdmin 4 and create a new server connection.
- Use the following details:
-
Name:
v6y_database
-
Hostname:
localhost
-
Name:
🔴 Common Error:
-
-bash: psql: command not found
-
Add PostgreSQL to your system's PATH:
export PATH=/path/to/PostgreSQL/bin:$PATH
git clone https://github.com/ekino/v6y.git
cd v6y
pnpm install
This installs dependencies for all monorepo modules.
-
In these directories:
v6y
,v6y-libs/core-logic
,front
,front-bo
,bff
, andbfb-*
, create an.env
file according to theenv-template
file content. -
Refer to GitLab Personal Access Tokens and GitHub Personal Access Tokens for generating tokens.
-
Initialize the database by running the following command from the root folder:
pnpm run init-db
The Frontend is responsible for displaying the user interface of the application, while the Backend for Frontend (BFF) acts as an intermediary layer between the frontend and backend systems. It handles data aggregation and communication with the backend services, ensuring that the frontend receives the required data in an optimized format.
To start these components:
-
Start the Backend for Frontend:
cd v6y-apps/bff pnpm start:dev
-
Start the Frontend:
cd v6y-apps/front pnpm start:dev
The Frontend Back Office (BO) is designed for administrative tasks, providing tools for managing application configurations, user accounts, and other backend settings. Like the main frontend, it communicates with the Backend for Frontend (BFF) for optimized data handling.
To start these components:
-
Start the Backend for Frontend:
cd v6y-apps/bff pnpm start:dev
-
Start the Frontend Back Office:
cd v6y-apps/front-bo pnpm start:dev
The Backend consists of various services that perform core application logic, including data processing, analysis, and storage. These services communicate with the Backend for Frontend (BFF) to deliver the required data to both frontend and back-office applications.
Start the following components:
-
Static Code Auditor:
cd v6y-apps/bfb-static-code-auditor pnpm start:dev
-
Main Analyzer:
cd v6y-apps/bfb-main-analyzer pnpm start:dev
-
Backend for Frontend (BFF):
cd v6y-apps/bff pnpm start:dev
🔵 GraphQL Playground:
Access the playground at http://localhost:4001/v6y/graphql
for testing queries and mutations.
The initial database data is critical for the application to function correctly as it provides the foundational data structures and default configurations required for core features. For example, it may include:
- Default Roles and Permissions: Ensuring proper access control mechanisms are in place.
- Configuration Settings: Predefined settings to bootstrap the application.
- Demo or Sample Data: Allows you to test and verify features during development.
-
Import the tar file into your PostgreSQL database.
-
To use the Front, Front-BO, or query the BFF, create a superadmin account in the database. Use the following SQL command to insert the account:
INSERT INTO accounts (username, email, password, role, created_at, updated_at, applications) VALUES ( 'superadmin', '[email protected]', '$2a$10$fSDUAlp4s8gJNc7HtZdMdeevQHAyRgCy6knbL1QQz3pHstXSbWm0W', 'SUPERADMIN', NOW(), NOW(), ARRAY[]::integer[] );
-
Include a Bearer token in the
Authorization
header for every query sent to the BFF. Obtain this token using the login query.
Contributing to this project can involve a variety of tasks, including:
- Bug Fixes: Identifying and resolving issues in the codebase.
- Feature Development: Implementing new features or improving existing functionality.
- Documentation: Enhancing project documentation to improve clarity and usability.
- Code Reviews: Reviewing pull requests to ensure code quality and adherence to guidelines.
- Testing: Writing unit tests, integration tests, or performance tests to ensure application stability.
- UI/UX Improvements: Refining the frontend design and improving user experience.
- Familiarize yourself with the project's structure and workflows.
- Check the GitHub Issues for tasks labeled as
good first issue
orhelp wanted
. - Follow the Contribution Guide for detailed instructions on submitting your contributions.
This project is licensed under the MIT License. See the LICENSE file for details.
For further assistance, contact our support team or open an issue on GitHub.