Simplifying cloud operations
Datum Staff Portal is a modern web application built with React and TypeScript, designed to streamline cloud operations management. The application uses the latest React Router v7 and is powered by Bun runtime.
- Runtime: Bun
- Frontend Framework: React 19
- Routing: React Router 7
- Styling: TailwindCSS
- Type Safety: TypeScript
- Build Tool: Vite
- Server: Hono
- Internationalization: Lingui
staff-portal/
├── app/ # Main application code
│ ├── components/ # Reusable UI components
│ ├── constants/ # Application constants
│ ├── features/ # Feature-specific code
│ ├── hooks/ # Custom React hooks
│ ├── layouts/ # Page layouts
│ ├── modules/ # Third-party library integrations and configurations
│ │ └── i18n/ # Internationalization files
│ ├── providers/ # React context providers
│ ├── routes/ # Application routes
│ ├── server/ # Server-side code
│ ├── styles/ # Global styles
│ └── utils/ # Utility functions
├── cypress/ # Cypress test files
│ ├── e2e/ # End-to-end test files
│ ├── fixtures/ # Test fixtures and mock data
│ ├── support/ # Support files and custom commands
│ └── component/ # Component test files
├── docs/ # Documentation
├── public/ # Static assets
└── .github/ # GitHub configuration- Bun (Latest version)
-
Clone the repository:
git clone https://github.com/datum-cloud/staff-portal.git cd staff-portal -
Install dependencies:
bun install
Start the development server:
bun run devBuild the application:
bun run buildStart the production server:
bun run startbun run dev- Start development serverbun run build- Build the applicationbun run start- Start production serverbun run lint- Run ESLintbun run format- Format code with Prettierbun run typecheck- Run TypeScript type checkingbun run extract- Extract messages for translationbun run compile- Compile translation messagesbun run test:e2e- Run end-to-end tests in CI modebun run test:e2e:prod- Run end-to-end tests against production buildbun run test:e2e:debug- Open Cypress Test Runner for E2E testsbun run test:unit:prod- Run component tests in CI modebun run test:unit:debug- Open Cypress Test Runner for component tests
The project uses Cypress for both end-to-end (e2e) and component testing:
- Component tests are written using Cypress Component Testing
- Tests are located in the
cypress/componentdirectory - Run component tests in CI mode with
bun run test:unit:prod - Open Cypress Test Runner for component tests with
bun run test:unit:debug
- E2E tests are written using Cypress
- Tests are located in the
cypress/e2edirectory - Run E2E tests in CI mode with
bun run test:e2e - Run E2E tests against production build with
bun run test:e2e:prod - Open Cypress Test Runner for E2E tests with
bun run test:e2e:debug
The project uses several tools to maintain code quality:
- ESLint for code linting
- Prettier for code formatting
- TypeScript for type safety
- Lefthook for git hooks
- Create a new branch for your feature
- Make your changes
- Submit a pull request
