Migrated to using Bun instead of Node and PNPM. This also brings in a Devcontainer which enables quick and easy development of the project. Additionally this adds connectivity to S3 (with a default Minio server pre-created) this enables Files to be uploaded against Mantises. There's also a new Internal Notes feature to store arbitrary text notes against a Mantis.
This commit is contained in:
parent
80ca48be70
commit
3b846b8c8e
23 changed files with 3210 additions and 6490 deletions
64
README.md
64
README.md
|
@ -3,54 +3,28 @@
|
|||
Multi-functional internal tool for StyleTech
|
||||
|
||||
## Setup
|
||||
This project is using VS Code Dev Containers. To set up the development environment, follow these steps:
|
||||
1. Install [Docker](https://www.docker.com/get-started) and [VS Code](https://code.visualstudio.com/).
|
||||
2. Install the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension in VS Code.
|
||||
3. Clone this repository to your local machine.
|
||||
4. Open the repository in VS Code.
|
||||
5. When prompted, select "Reopen in Container" to build the development container.
|
||||
6. Once the container is built, you can start developing the project.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
1. **Docker**:
|
||||
* **Windows/Mac**: Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) (this is available free, ignore the "Choose Plan" button, and scroll down to the download button).
|
||||
* **Linux**: Install [Docker Engine](https://docs.docker.com/engine/install/).
|
||||
2. **Node.js**: Install Node.js version 22. You can download it from the [official Node.js website](https://nodejs.org/) or use a version manager like [volta](https://docs.volta.sh/guide/getting-started)
|
||||
3. **pnpm**: Install `pnpm` globally using npm (which comes with Node.js):
|
||||
```bash
|
||||
npm install -g pnpm
|
||||
```
|
||||
4. **quasar cli**: Install the quasar CLI globally using npm:
|
||||
```bash
|
||||
npm install -g @quasar/cli
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
Clone the repository and install the project dependencies using `pnpm`:
|
||||
|
||||
```bash
|
||||
git clone <repository-url>
|
||||
cd <repository-directory>
|
||||
pnpm install
|
||||
## Project Structure
|
||||
```
|
||||
src/ -- Frontend source code
|
||||
src-server/ -- Backend source code
|
||||
```
|
||||
|
||||
### Setting up Environment Variables & Compose File
|
||||
Copy the example `.env.example` file to `.env` and update the values (primarily passwords or access tokens) as required.
|
||||
## Frontend
|
||||
The frontend is built using [Quasar](https://quasar.dev/) and [Vue 3](https://vuejs.org/). It uses [Pinia](https://pinia.vuejs.org/) for state management and [Vue Router](https://router.vuejs.org/) for routing. The frontend is located in the `src/` directory.
|
||||
|
||||
Copy the example `docker-compose.example.yml` file to `docker-compose.yml` and update the password as required (matching that set in the `.env` file).
|
||||
## Backend
|
||||
The backend is built using [Express](https://expressjs.com/). It uses [Prisma](https://www.prisma.io/) for database access. The backend is located in the `src-server/` directory
|
||||
|
||||
### Running the Development Server
|
||||
## Running the Project
|
||||
To run the project, simply run `bun dev`. This will automatically start everything up for you, and vaildate all necessary dependencies are installed. You can then access the frontend at `http://localhost:9100`, and the backend at `http://localhost:9101`.
|
||||
|
||||
To start the development server, run:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
This will start the PostgreSQL server on `localhost:5432` the API server on `localhost:8000` (shouldn't need to directly work with this) and the application server accessible at [http://localhost:9000](http://localhost:9000).
|
||||
|
||||
I recommend using [Postico](https://eggerapps.io/postico/) for Mac or [pgAdmin](https://www.pgadmin.org/) for Windows to manage the PostgreSQL database.
|
||||
|
||||
### Building for Production
|
||||
|
||||
To create a production build of the application, run:
|
||||
|
||||
```bash
|
||||
pnpm run build
|
||||
```
|
||||
## Registering a new user
|
||||
The application requires a Registration Token to register a new user. This defaults to `INITIAL_REGISTRATION_TOKEN_PLEASE_CHANGE_ME`. Use this to register an initial account, you can then change it via the Application Settings.
|
Loading…
Add table
Add a link
Reference in a new issue