This project uses Preact (Faster & Leaner React) with Vite and deployed to Netlify
Installations Required:
-
Clone the project and copy the ENV template file to a new ENV file.
git clone https://github.com/RinMinase/anidb.git cd anidb cp .env.example .env
-
Modify the created ENV file based on your Firebase configuration
-
Install the dependencies then run the project
yarn install yarn start
-
Fire up your browser and go to
localhost:3000
Installations Required:
-
Fire up your terminal inside the project folder.
-
Build the project by running:
yarn build
-
This should generate a
dist/
folder inside the project folder.
.
βββ public/ # Public assets folder
βββ dist/ # Compiled production code
βββ src/ # Project source code
β βββ<module-name>/
β β βββ <component> # Module sub-components
β β βββ index.tsx # Module entry point
β βββ common/ # Project-wide reusable code
β β βββ components/ # Common components
β β βββ pages/ # Common pages (404 / 500 pages)
β β βββ providers/ # Context provider components
β β βββ index.ts # Entry point for common imports
β βββ main.tsx # Main module
β βββ routes.tsx # Routes file
β βββ service.ts # Axios pre-setup
β βββ ... # Other source code files
βββ .editorconfig # IDE / Editor configuration
βββ .env # Environment file
βββ index.html # Main HTML file (Vite bundler entry point)
βββ tsconfig.json # Source code TypeScript configuration file
βββ tsconfig.node.json # Vite TypeScript configuration file
βββ ... # Other project files
Notes:
As to why the
index.html
file is located on the root of the project, refer to: https://vitejs.dev/guide/#index-html-and-project-root
Task automation is based on Yarn scripts or NPM scripts.
Task | Description |
---|---|
yarn dev |
Run dev server on http://localhost:3000/ |
yarn preview |
Run prod server on http://localhost:3000/ |
yarn build |
Build production code to dist folder |
yarn lint |
Runs code linter manually |
yarn cz |
Commitizen commit formatter |
Preact - Web Framework
TypeScript - Language syntax
Vite - Source Code Bundler
Emotion CSS - CSS pre-processor
Material UI - Layouting Framework
Netlify - Hosting Platform