2025-04-03 13:59:27 +07:00
# IMPHNEN Frontend Service
2025-03-13 00:50:45 +07:00
2025-04-03 14:01:14 +07:00
<p align="center">
2025-04-03 13:59:27 +07:00
<img src="docs/logo.svg" alt="IMPHNEN">
2025-04-03 14:03:38 +07:00
</p>
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
This repository is a **monorepo** for all frontend services of IMPHNEN. The monorepo includes three main applications:
2025-03-13 00:50:45 +07:00
2025-05-20 11:09:14 +07:00
1. **Gacha** - Application for <a href="https://gacha.imphnen.dev/" target="_blank">Gacha Website</a>.
2. **Backoffice** - Application for <a href="https://gacha.imphnen.dev/" target="_blank">Internal Management Website</a>.
3. **Dimentorin** - Application for <a href="https://dimentorin.imphnen.dev/" target="_blank">Mentoring Service</a>.
4. **Landing Page** - Application for <a href="https://imphnen.dev/" target="_blank">Landing Page</a>.
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
## How to install
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
1. Clone this repository:
```sh
git clone https://github.com/IMPHNEN/imphnen-frontend-service.git
cd imphnen-frontend-service
` ``
2. Install all dependencies:
` ``sh
npm install
` ``
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
## How to run
2025-03-13 00:50:45 +07:00
2025-05-20 11:09:14 +07:00
### Setup Environment Variables
Before running the applications, you need to set up the environment variables. You can do this by copying the ` .env.example` file to ` .env` and modifying the values according to your needs.
` ``sh
cd apps/{appname}
cp .env.example .env
` ``
2025-04-03 13:59:27 +07:00
### Development
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
Use the following commands to run in development mode:
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
- **Gacha**:
` ``sh
npm run gacha:dev
` ``
- **Backoffice**:
` ``sh
npm run backoffice:dev
` ``
- **Dimentorin**:
` ``sh
npm run dimentorin:dev
` ``
2025-05-20 11:09:14 +07:00
- **Landing Page**:
` ``sh
npm run landing:dev
` ``
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
### Build
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
Use the following commands to build the applications:
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
- **Gacha**:
` ``sh
npm run gacha:build
` ``
- **Backoffice**:
` ``sh
npm run backoffice:build
` ``
- **Dimentorin**:
` ``sh
npm run dimentorin:build
` ``
2025-05-20 11:09:14 +07:00
- **Landing Page**:
` ``sh
npm run landing:build
` ``
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
### Production
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
Use the following commands to run the applications in production mode:
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
- **Gacha**:
` ``sh
npm run gacha:prod
` ``
- **Backoffice**:
` ``sh
npm run backoffice:prod
` ``
- **Dimentorin**:
` ``sh
npm run dimentorin:prod
` ``
2025-05-20 11:09:14 +07:00
- **Landing Page**:
` ``sh
npm run landing:prod
` ``
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
### Storybook
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
This repository uses Storybook to develop, test, and document UI components in an isolated and interactive environment. Below are the commands to work with Storybook:
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
- **Run Storybook**
2025-05-20 11:09:14 +07:00
2025-04-03 13:59:27 +07:00
This command starts Storybook in development mode, allowing you to view and test UI components interactively.
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
` ``sh
npm run ui:storybook
` ``
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
- **Run Unit Test**
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
This command runs unit tests for the UI components to ensure they function as expected.
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
` ``sh
npm run ui:test
` ``
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
- **Build Components**
2025-03-13 00:50:45 +07:00
2025-04-03 14:03:38 +07:00
This command generates a static build of Storybook, which can be deployed for sharing and documentation purposes.
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
` ``sh
npm run ui:build
` ``
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
## How to contribute
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
1. Fork the repository and clone it locally.
2025-04-03 14:03:38 +07:00
2. Create a new branch for a new feature or fix:
2025-04-03 13:59:27 +07:00
` ``sh
2025-04-03 14:15:52 +07:00
git checkout -b feat/feature-name
2025-04-03 13:59:27 +07:00
` ``
3. Make changes, commit, and push to your forked repository.
4. Create a pull request to this repository ` develop` branch.
2025-03-13 00:50:45 +07:00
2025-04-03 13:59:27 +07:00
If you encounter any issues or problems, feel free to create a new Issue.