Kellton Europe CPF app is an innovative web-based platform – a seamless solution designed to connect employees, managers, and directors to facilitate the career development of each team member. This dynamic application empowers employees to track progress and milestones toward their chosen career paths. Managers and directors can easily oversee employee development, monitor assigned goals, and provide essential support for continuous growth. Experience enhanced collaboration and foster a thriving, goal-oriented work environment with a cutting-edge platform.
- Cloning and Initializing
- Installation
- Usage
- Wiki
- Contributing
- Development
- Frontend
- Backend
- License
- Contact
When you clone a repository that includes submodules, you need to ensure that the submodules are initialized and updated to the correct versions. This guide will walk you through the steps to properly clone and initialize a repository with submodules.
To clone the repository along with its submodules, use the --recurse-submodules
flag. This ensures that all submodules are cloned and initialized automatically.
Step 1:
git clone --recurse-submodules [email protected]:Tivix/cpf.git
Step 2:
cd cpf
If the repository has already been cloned without the --recurse-submodules flag, you can manually initialize and update the submodules using the following commands:
git submodule init
git submodule update
Instructions on how to install and set up the project.
cp .envexample .env
for testing purposes you might want to change flag USE_MOCK_USER
to True
docker compose build
docker compose up
or just
docker compose up --build
After you have done the above steps, you should be able to access the application.
To seed your database with initial data once your project is up and running, follow these steps:
Copy the contents of the seed.sql file located in the root directory of your project.
Go to the Supabase admin panel.
Navigate to the SQL Editor on the left side panel.
Paste the contents of the seed.sql file and hit 'Run'.
Users can be added to the app through various methods:
- Supabase Panel: Go to
localhost:8080
to create a user directly in the Supabase dashboard - authentication tab. - Directly from a Browser: Go to
localhost:8080/cpf/auth
to create a user via a authentication flow. Going forward we will probably get rid of this feature and focus on single sign on. - Add Employee flow: Employees can be added through the dashboard at
localhost:8080/cpf/people/add-new
. The default password ispassword
.
When a user is created through any of these methods, the following processes occur:
- Supabase automatically creates a new user in the
auth.users
table. - The
auth.users
table has anon_auth_user_created
trigger that firesAFTER INSERT
. This trigger calls theon_auth_user_created
function to handle following:- Profile Creation:
- Inserts a new record into the
public.profiles
table. - Extracts the
first_name
,last_name
, andstatus
from theraw_user_meta_data
field, if provided. - The
status
field is anpublic.profile_status
enum. If not provided, it remainsNULL
.
- Inserts a new record into the
- Role Assignment:
- Inserts a new entry into the
public.user_roles
table. - The default role assigned is
employee
.
- Inserts a new entry into the
- Ladder Information:
- Inserts a new entry into the
public.user_ladder
table with optional fieldsladder_slug
,current_band
,technologies
- Inserts a new entry into the
- Profile Creation:
Instructions on how to use the project.
For more information, check out the project's wiki under the link: https://github.com/Tivix/cpf/wiki
Guidelines for contributing to the project.
- Fork the repository.
- Create a new branch.
- Make your changes.
- Commit your changes.
- Push to the branch.
- Open a pull request.
api
- Contains api calls.app
- The App Router by Next.js.components
- Contains all components used in the app.common
- In the common folder, we keep all essential components like Button, Card, or Input.modules
- Here we keep more complex components that are still reusable or are part of layouts.pages
- Here we compose view together to create a page. If you want to extract some module of the page, createmodules
folder there and put it in it.
constants
- Contains all the constant values used in the app.static
- Contains assets like icons.store
- Contains all stores for state management.types
- Contains all reusable types and interfaces that are shared between many pages and modules.utils
- Contains all utility functions like data transformations or calculations.
Component folder should contain:
index.ts
- importing and exporting the component.ComponentName.tsx
- view part of a component.ComponentName.interface.ts
- types related to that component.ComponentName.hooks.tsx
- the logic of our component
Swagger and redoc can be accessed using following urls:
Specify the license under which the project is distributed.
Contact information for the project maintainer or team.
- Email: [email protected], [email protected]
- GitHub: https://github.com/Tivix/cpf