TTime/README.md

109 lines
3.8 KiB
Markdown
Raw Normal View History

2024-02-12 15:05:28 +01:00
<div align="center">
2024-02-12 16:38:58 +01:00
<h1 align="center">TTime</h3>
2024-02-12 15:05:28 +01:00
<p align="center">Time Tracking Platform</p>
2024-02-12 14:59:41 +01:00
</div>
---
## Introduction
A time tracking platform that allows users to track their time and generate reports.
## Build Instructions
The full build instruction is available [here](./BUILD.md).
For developers specializing in the **backend**, there is documentation [here](./backend/README.md).
For developers specializing in the **frontend**, there is documentation [here](./frontend/README.md).
2024-02-12 17:36:56 +01:00
2024-02-12 15:18:37 +01:00
Dependencies:
2024-02-12 16:19:42 +01:00
- [Go](https://go.dev/)
2024-02-12 17:27:43 +01:00
- [Make](https://www.gnu.org/software/make/)
2024-02-12 16:19:42 +01:00
- [Node & npm](https://nodejs.org/en/)
- [Podman](https://podman.io/) / [Docker](https://www.docker.com/)
2024-02-12 17:27:43 +01:00
- [Just](https://github.com/casey/just) (Optional)
2024-02-12 15:18:37 +01:00
### Fedora/Red Hat
2024-02-12 17:18:41 +01:00
If you're on [Fedora](https://fedoraproject.org/)/Red Hat derivatives, this is as simple as:
```bash
sudo dnf install -y make golang nodejs podman just
```
### Debian/Ubuntu
2024-02-12 17:36:56 +01:00
Any [Debian](https://www.debian.org/)/[Ubuntu](https://ubuntu.com/desktop)-based distro:
2024-02-12 17:18:41 +01:00
```bash
sudo apt install -y make golang nodejs podman
sudo apt install -y just # For Ubuntu
```
### Arch Linux
2024-02-12 17:36:56 +01:00
[Arch Linux](https://archlinux.org/) & derivatives:
2024-02-12 17:18:41 +01:00
```bash
sudo pacman -S make go nodejs npm podman just
```
2024-02-12 18:01:57 +01:00
### MacOS
2024-02-12 18:01:57 +01:00
[MacOS](https://www.apple.com/macos/): (Requires [Homebrew](https://brew.sh/)) (Untested)
```bash
brew install make go nodejs npm podman just
```
### Windows
#### Vanilla Windows
The project should now build properly on Windows, given the dependencies:
- [Go](https://go.dev/)
- [Node & npm](https://nodejs.org/en/)
With chocolatey, you can install these dependencies with the following commands:
```powershell
choco install -y golang nodejs
```
Note that none of the convenience tools (Make, Podman, Just*) are available on Windows.
*Just is available, but the targets are written for a Unix-like environment.
#### Windows Subsystem for Linux (WSL)
2024-02-13 11:30:41 +01:00
Unfortunately, [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install) is required for the build process. Running any form of containerized workload on windows is currently unsupported. More info [here](https://podman.io/docs/installation#windows). From my understanding, WSL also requires virtualization extensions to be enabled in the BIOS, which is not always the case for all users.
2024-02-12 18:01:57 +01:00
2024-02-13 11:30:41 +01:00
It is possible to run the code on Windows, but this will be without the use of containers or any other build tools that are not available on Windows.
You will also eventually need to install the database server, which will not be containerized.
My recommendation would be to make WSL your primary development environment if you are on Windows. This will drop you into an Ubuntu environment, in which you can follow the instructions above.
2024-02-13 11:40:32 +01:00
You should consult the [WSL documentation](https://docs.microsoft.com/en-us/windows/wsl/install), but for any recent version of windows, installation essentially boils down to running the following command in **PowerShell as an administrator**:
```powershell
2024-03-07 12:26:08 +01:00
wsl --install -d Ubuntu-22.04 # To get a somewhat recent version of Go
2024-02-13 11:40:32 +01:00
```
After this, you can open a (wsl) terminal and run the commands:
```bash
sudo apt update && sudo apt upgrade
sudo apt install -y make podman
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go
# For a recent version of node:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
nvm install node
```
If you get any errors related to virtualization, you will need to enable virtualization in the BIOS. This is a common issue, and you can find a guide for your specific motherboard online. This is a one-time operation and will not affect your windows installation. This setting is usually called "VT-x" or "AMD-V" and is usually found in the CPU settings.