Frontend¶
This page dicusses how to contribute on the frontend component of Docuisine. We write using JavaScript with the ReactJS framework due to its mature ecosystem and is familiar to many developers.
The frontend is written in JavaScript (TypeScript) using ReactJS. We use shadcn for the UI components and TailwindCSS for CSS. We use Node.js for running JavaScript and Vite for project bootstrapping, building and running a development server.
Getting Started¶
The project is in this repository.
-
Clone that repo using your favorite terminal
-
Enter the project directory and open it using your IDE or simply use a text editor.
-
Install dependencies with npm
-
Setup environment variables
VITE_BACKEND_URL - This is where we access the backend. VITE_IMAGE_HOST - This the S3 bucket and images are stored. VITE_APP_VERSION - Optional, but is used to display the version hash on production, we do not set this manually on production.
Now you are ready to write code.
Development Process¶
When writing code, you should run a development server, so you have direct feedback from your changes.
When you run that command, it should look like this.
❯ npm run dev
> docuisine-react@0.0.0 dev
> vite
VITE v7.3.0 ready in 379 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
This means that you can now access the frontend on http://localhost:5173/.