This application provides functionality for users to log in and log out, as well as view a list of servers.
-
Installation: After cloning the repository to your local machine, navigate to the project folder and run
npm installto install the necessary dependencies. -
Setting up Environment Variables: Create a
.envfile at the root of your project and include theVITE_API_URLvariable. Set it to the appropriate API endpoint.VITE_API_URL=<Api base url> -
Running the Application: Use the command
npm run devto run the application in development mode. -
Building the Application: Run
npm run buildto create a production-ready build. -
Previewing the Application: You can preview the built application using
npm run preview. -
Linting: To lint your project using eslint, run
npm run lint. -
Executing Tests: Run
npm run testto execute the tests. -
Generating Test Coverage: Run
npm run test:coverageto generate a test coverage report.
The application is hosted on AWS and served globally through CloudFront. You can access the live application at this URL: https://d3hh6l3s68qbsn.cloudfront.net A 'Deploy Production' GitHub workflow is available for automatic deployment.
-
Consistent Codebase: Implement
eslintandprettierto maintain a consistent codebase, particularly when multiple developers are contributing to the repository. Including a linting check in the CI/CD process will assist in preserving code quality. -
Comprehensive Testing: Prioritize the incorporation of integration and end-to-end tests to enhance code reliability and sustainability. Limited time and overlapping vacation schedules hindered comprehensive testing during initial development.
-
Advanced Application Architecture: Consider refining the application architecture to utilize more advanced methods, such as a feature/sliced architecture. Given the initial scale of the project, a straightforward React application architecture was employed, but additional contributors and project growth could warrant the inclusion of extra layers, such as modules, widgets, features, entities, etc.
-
Automated Test Running in CI/CD: Including automated test runs in the CI/CD pipeline would ensure that every pull request maintains consistent test coverage.
-
Unified Components: Design more unified components for the project. Future design and scale uncertainties currently discourage unnecessary unification, but as the project evolves, such an approach might become beneficial.
-
Secure Token Storage: Shift from storing the API token in local storage to employing a dedicated backend layer for API interaction. Storing the token in a cookie with an
httpOnlyflag would enhance security and prevent token access via JavaScript. -
Server-Side Rendering (SSR): If SEO and performance become critical factors for the application, consider utilizing SSR. A solution like Next.js, with its extensive built-in tooling, could be a viable option.
-
Environment Expansion: Expand the number of available environments. Currently, only local and production environments exist. However, a more comprehensive setup should include environments such as development, staging, etc., to streamline team workflows.