From 5233121921936546a07feab2afa40d81028cc0ae Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Sat, 17 Aug 2024 12:21:23 +0000 Subject: [PATCH] feat: rest of the containerisation --- .devcontainer/devcontainer.json | 14 +- .vscode/extensions.json | 5 + .vscode/settings.json | 3 +- Dockerfile.dev | 2 +- README.md | 23 ++- dev/functions.fish | 5 + docs/docs/api/routes/users.md | 2 +- docs/docs/contributing/components.md | 25 +-- docs/docs/contributing/components/core.md | 43 ++++++ .../contributing/components/documentation.md | 30 +--- docs/docs/contributing/components/seeds.md | 41 +++-- docs/docs/contributing/cookbook/sdvx-mdb.md | 2 - docs/docs/contributing/core.md | 3 - docs/docs/contributing/index.md | 18 +-- docs/docs/contributing/setup.md | 143 +++++++++++------- 15 files changed, 205 insertions(+), 154 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 docs/docs/contributing/components/core.md delete mode 100644 docs/docs/contributing/core.md diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1e751ba36e..6af984cbf9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,10 +7,20 @@ "workspaceFolder": "/tachi", "postAttachCommand": "./dev/bootstrap.sh", "updateRemoteUserUID": true, - // "containerUser": "tachi", + "containerUser": "tachi", "customizations": { "vscode": { - "settings": {}, + "settings": { + "typescript.tsdk": "node_modules/typescript/lib", + "[typescriptreact]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[typescript]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + } + }, "extensions": [ "dbaeumer.vscode-eslint" ] diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..43321cdcb9 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "ms-vscode-remote.remote-containers" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 034a269127..d01d0f0219 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,5 @@ }, "[typescript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" - } -} + }, } \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index 4855105cac..e5ae551d56 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -34,7 +34,7 @@ RUN rm -f /etc/localtime && ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime RUN echo "LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8" > /etc/default/locale # nice to haves -RUN apt install -y fish just fzf curl wget parallel neovim fd-find bat +RUN apt install -y gh fish just fzf curl wget parallel neovim fd-find bat # `fd` is called `find-fd` on ubuntu. Awesome. RUN ln -s $(which fdfind) /usr/bin/fd diff --git a/README.md b/README.md index 606886a401..a987f3f991 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,28 @@ Check the [Documentation](https://docs.tachi.ac/contributing/setup) for how to s You can then check the component-specific guides to see how to run those components and contribute back! -## Quick Setup For Nerds +## Quick Setup For Experienced Programmers -Already know what you're doing? +Install VSCode and use the dev container extension. +This is my the supported way of working and will ensure you have the correct versions of everything. -Install docker + docker-compose and use `./run.sh start` or `./run.bat start` to start Tachi. +### Unsupported stuff -Other commands you might want to execute are included inside the `run` file. +Tachi is intended to be developed inside a container. This ensures that you have the correct version of MongoDB, Redis, Typescript and all that jazz. + +VSCode has excellent native support for dev containers, and as such this is the only method of local development we officially support. + +Over the years we have had a *lot* of issues with people having subtle variations on their system (or on windows). Given the contributor-centricity of Tachi, it's untenable to expect every contributor to be an expert with local dev setup. + +The devcontainer provides us with the most simple, consistent experience, and allows us to put nice-to-haves inside the user's shell. + +That said, if you're ardently against using VSCode or Docker... + +**DO NOT REPORT ISSUES TO ME IF YOU DO THIS** + +You can run the docker-compose file and `dev/boostrap.sh` inside the container yourself. Work inside the container. + +Alternatively if you want to work outside of docker you're on your own. Figure out the correct versions for everything (npm, pnpm, mongo, redis, ts-node...) and `dev/bootstrap.sh`. ## Repository Info diff --git a/dev/functions.fish b/dev/functions.fish index 26402672a5..9064ecf046 100644 --- a/dev/functions.fish +++ b/dev/functions.fish @@ -28,6 +28,11 @@ end function fish_greeting + # check $PATH is correct + if not contains ~/.local/pnpm $PATH + fish_add_path ~/.local/pnpm + end + echo "Welcome to $(rgb "Tachi" e61c6e 131313)!" if ! test -e /tachi/I_HAVE_BOOTSTRAPPED_OK diff --git a/docs/docs/api/routes/users.md b/docs/docs/api/routes/users.md index d6718d4d89..33756e4c82 100644 --- a/docs/docs/api/routes/users.md +++ b/docs/docs/api/routes/users.md @@ -71,7 +71,7 @@ None. ### Example !!! note - `zkrising` is the username for the user with userID 1. + `zk` is the username for the user with userID 1. it's also the username of the person writing these docs. Hi! diff --git a/docs/docs/contributing/components.md b/docs/docs/contributing/components.md index 79fb14b64f..e37a1a4556 100644 --- a/docs/docs/contributing/components.md +++ b/docs/docs/contributing/components.md @@ -4,12 +4,6 @@ The Tachi repository that you just set up is made up of multiple "components". All of them have their own things going on, so this page has all the guides for each specific component. -## For Professionals... - -If you're already very familiar with `git`, the terminal, `node` and JSON, and care more about Tachi specific stuff (how to get the components running, what our architecture looks like), you should skip over that stuff in each guide. - -We maintain these guides so that people with knowledge about how to improve Tachi can help out, regardless of their skill level! As such, not all of the information will be of use to you - Skip over the tooling explanations. - ## What can I contribute to? In order of difficulty, here are the components of Tachi you can contribute to! @@ -25,7 +19,7 @@ of the bug. !!! note Although they're called GitHub *issues*, they're actually used for tracking anything. If you've - came up with a cool feature idea, send it over as an issue! `zkrising` will read and Triage them. + came up with a cool feature idea, send it over as an issue! `zk` will read and Triage them. For more information, read our [Issue Reporting Guide](./components/issues.md). @@ -35,15 +29,11 @@ We store our documentation as a series of markdown files in the [Main Repository Writing, maintaining and proofreading the documentation is something that is **severely** neglected at the moment. Simple things like typo fixes, all the way up to writing new explanations about major features -are **thoroughly** appreciated, as `zkrising` prioritises maintaining the core of working code. +are **thoroughly** appreciated, as `zk` prioritises maintaining the core of working code. If you're interested in this, check out the [Documentation Contribution Guide](./components/documentation.md). -It'll teach you `shell` and `git` basics, -setting up a programming environment for Tachi, -and how to use our documentation builder. - -### Database Seeds +j### Database Seeds We use an interesting system for parts of our database. We actually store a game's songs and charts *in* our GitHub repository! That means you can: @@ -56,9 +46,9 @@ our GitHub repository! That means you can: !!! important This part of Tachi is the most important part for external contributors. - You guys know these games better than `zkrising` does, and you guys keep an eye on all the updates for your games! + You guys know these games better than `zk` does, and you guys keep an eye on all the updates for your games! - If people don't add songs/charts to this database, `zkrising` will **not** keep an eye on the game for you! Someone *has* to pick up the reigns for each game! + If people don't add songs/charts to this database, `zk` will **not** keep an eye on the game for you! Someone *has* to pick up the reigns for each game! If you want to add/fix songs, charts, folders or tables for your favourite game - **START HERE!** @@ -66,11 +56,6 @@ our GitHub repository! That means you can: Want to get started on contributing to the Database? Check out our [Database Contribution Guide](./components/seeds.md). -It'll teach you `shell` and `git` basics, -setting up a programming environment for Tachi, -`json`, -and we'll even do a little scripting as a treat! - ### Server, Client The server and client form the powerful *core* of Tachi. diff --git a/docs/docs/contributing/components/core.md b/docs/docs/contributing/components/core.md new file mode 100644 index 0000000000..4af1387b4c --- /dev/null +++ b/docs/docs/contributing/components/core.md @@ -0,0 +1,43 @@ +# Client + Server Contribution Guide + +The client and server are the meat and potatoes of Tachi. They handle all of our requests and display our fancy UI. + +Contributing here is a bit more difficult than contributing to the seeds, but it's certainly not impossible! + +Plus, it's good fun to be able to mess around with websites. If you've got something you want to mess around with, you might find it surprisingly easy to do! + +## Pre-Setup + +You must have [Setup a local dev environment](../setup.md) in order to work nicely with the docs! + +## Component Overview + +The content for the client is inside `client/` and the content for the server is inside `server/`. + +The client and server share quite a bit of code. This is inside `common/`. + +To run the client and server, use `just start`. You can hit `Ctrl+C` to stop the server. + +## Editing the Client + +With `just start` running, the client will listen for changes you make, and reload accordingly. You will see your changes reflected on http://127.0.0.1:3000. + +## Editing the Server + +Likewise, with `just start` running, the server will listen for changes you make, and reload accordingly. + +!!! warning + Be careful with triggering a server reload. If you do it mid-import you can cause some serious state issues. + + If you suspect that your local state is screwed up, run `just wipe-local-db` to reset + the database. + +## Getting real data + +The client, out of the box, is sort of hard to test because you'll have no scores to display. + +Use `just load-kamai-dataset` or `just load-boku-dataset` to load a *real* dataset from either of the Tachis. + +You'll then need to edit `server/conf.json5` and change `MONGO_DATABASE_NAME` to `"anon-kamai"` or `"anon-boku"`. + +Everyone's passwords are set to `password`, so feel free to log in as anyone, and see real data! \ No newline at end of file diff --git a/docs/docs/contributing/components/documentation.md b/docs/docs/contributing/components/documentation.md index df22a43fb5..57e1b96eae 100644 --- a/docs/docs/contributing/components/documentation.md +++ b/docs/docs/contributing/components/documentation.md @@ -2,14 +2,9 @@ The documentation component of Tachi powers the website you're currently viewing. Hi! -## Tool Knowledge +## Pre-Setup -To properly contribute to the documentation, you'll need to know the following things: - -- [The Terminal](../tools/terminal.md) -- [Git](../tools/git.md) - -If you don't know, or aren't comfortable with all of the things on this list, click on them to learn about them! +You must have [Setup a local dev environment](../setup.md) in order to work nicely with the docs! ## Component Overview @@ -20,33 +15,20 @@ It contains another folder, inconveniently called `docs/`, which contains all of There's another folder called `includes/`, which contains some things that are constantly referenced throughout the documentation. -At the top level, there's `mkdocs.yml`, which we'll go over later. +At the top level, there's `mkdocs.yml` which configures how our documentation works later. ## Software Overview We use [MKDocs Material](https://squidfunk.github.io/mkdocs-material/) for our documentation. It extends markdown a bit to let us add things like admonitions and references. -This is a Python package, making it the only part of our codebase that is Python based. As such, you'll need a way of installing python packages. - -Their documentation is **incredibly** good, so check their stuff out there if you want to use their markdown extensions. - -Other than that, our documentation is vanilla [markdown](https://www.markdownguide.org/basic-syntax/). If you know how to write a reddit comment, you know how to write documentation. - -## Dependencies - -Use `pip` to install `mkdocs` and `mkdocs-material`. - -!!! danger - [Python package management is an utter disasterous mess](https://stackoverflow.com/questions/48941116/does-python-pip-have-the-equivalent-of-nodes-package-json). Feel free to set up a venv or some other elaborate rube-goldberg machine to ensure that your packages don't bleed everywhere. - - Either way, you want to install such that is `mkdocs` on your terminal. +Their documentation is **incredibly** good, so check their stuff out there if you want to see what features are available. - You might have to restart your terminal after installing it, depending on the alignment of `pip` with the sun. +Other than that, our documentation is [markdown](https://www.markdownguide.org/basic-syntax/). If you know how to format a discord message, you know how to write documentation! ## Running the Documentation -Use `mkdocs serve` inside Tachi's `docs/` folder to start up a local documentation viewer on port `8000`. +Use `just docs start` inside Tachi to start up a local documentation viewer on http://127.0.0.1:8001. This will automatically refresh when you edit anything related to the documentation, so you can quickly see how your stuff goes. diff --git a/docs/docs/contributing/components/seeds.md b/docs/docs/contributing/components/seeds.md index cc468ff3aa..59c5b61af2 100644 --- a/docs/docs/contributing/components/seeds.md +++ b/docs/docs/contributing/components/seeds.md @@ -5,19 +5,9 @@ The database seeds component of Tachi controls the actual data inside the app. Changes made in this component are automatically synchronised with the live Tachi database, it's kind of a cool system, and allows anyone to contribute patches to songs, charts, folders, and more! -## Tool Knowledge +## Pre-Setup -To properly contribute to the documentation, you'll need to know the following things: - -- [The Terminal](../tools/terminal.md) -- [Git](../tools/git.md) -- [JSON](../tools/json.md) - -If you know JavaScript, that will be helpful for the scripting sections when we go over how -to batch-apply updates. -However, we don't maintain a JS guide (yet). You'll have to ask in the discord! - -If you don't know, or aren't comfortable with all of the things on this list, click on them to learn about them! +You must have [Setup a local dev environment](../setup.md) in order to work nicely with the docs! ## Component Overview @@ -38,10 +28,6 @@ The collections are all just plain JSON files. The scripts are written in either TypeScript or JavaScript. -## Dependencies - -Installation of dependencies for this part of the codebase should be already handled, if you ran the `bootstrap.sh` script. - ## How do I know what a song is meant to look like? These are called schemas (or interfaces) and you can find them in two places: @@ -60,14 +46,11 @@ We also maintain a bit more human readable form for schemas in this documentatio ## Important Scripts -After doing **anything** to the collections, such as adding a new item to the database, you **MUST** run `pnpm run sort` inside the `scripts/` folder. +After doing **anything** to the collections, such as adding a new item to the database, you **MUST** run `just seeds sort` inside the `scripts/` folder. This will deterministically sort the data you put into the collections, making sure that `git` history stays sane (i.e. it only says things that actually changed, changed). -!!! info - `pnpm run sort` is an alias for `node deterministic-collection-sort.js` - -Before sending any changes, run `pnpm test` to check all your data. If anything you've sent is invalid, it'll be logged in `failed-tests.log`, and the command won't pass. +Before sending any changes, run `just seeds test` to check all your data. If anything you've sent is invalid, it'll be logged in `failed-tests.log`, and the command won't pass. This is automatically ran when changes are sent to me, but you should run it yourself before committing anyway! @@ -87,12 +70,17 @@ It should be obvious what each one does, though. If you're looking to add a BMS table to Tachi for an example, you'd look into the rerunner scripts. -## Single-Time Scripts +## Single-Use Scripts -Some scripts we only want to run once, and we don't really need to keep them around. These are saved into the `single-time` folder, and will never be tracked by `git`. +Some scripts we only want to run once, and we don't really need to keep them around. These are saved into the `single-use` folder, and will never be tracked by `git`. You can make quick hacky scripts here. +!!! warning + Anything in this folder will *NOT* be shared. Please be generous with what you share, + far too many people have assumed nobody is interested in their scripts, and then lost + the scripts when moving machines! + ## Scripting Changes We provide utilities for mutating data inside the collections comfortably inside `scripts/util.js`. The most important one is `MutateCollection`, which, as expected, mutates a collection. @@ -142,4 +130,9 @@ Below are some examples of what you can do with this API. }); ``` -For even more examples, see the `rerunners/` folder, as it makes liberal use of this API. \ No newline at end of file +For even more examples, see the `rerunners/` folder, as it makes liberal use of this API. + +## Running scripts + +To run a seeds script, type `seeds` and pick your script. This will type out the +command for you. diff --git a/docs/docs/contributing/cookbook/sdvx-mdb.md b/docs/docs/contributing/cookbook/sdvx-mdb.md index 8a32704cfe..1fa9db4c9b 100644 --- a/docs/docs/contributing/cookbook/sdvx-mdb.md +++ b/docs/docs/contributing/cookbook/sdvx-mdb.md @@ -19,5 +19,3 @@ The file you're looking to run is `merge-mdb.ts`, but it needs two arguments: You can run this script by typing `ts-node merge-mdb.ts --input YOUR_INPUT_HERE --version YOUR_VERSION_HERE` in the terminal. -!!! tip - Make sure you have `ts-node` installed. If you don't, you can get it with `pnpm add -g ts-node`. diff --git a/docs/docs/contributing/core.md b/docs/docs/contributing/core.md deleted file mode 100644 index 56c1bcb570..0000000000 --- a/docs/docs/contributing/core.md +++ /dev/null @@ -1,3 +0,0 @@ -# Client + Server Contribution Guide - -Sorry! I haven't wrote this yet. \ No newline at end of file diff --git a/docs/docs/contributing/index.md b/docs/docs/contributing/index.md index 99e11a04f4..213e9e0f53 100644 --- a/docs/docs/contributing/index.md +++ b/docs/docs/contributing/index.md @@ -8,30 +8,20 @@ But, what *can* you contribute, and where can you help out? Contrary to what you might already think, contributing to Tachi actually has remarkably little to do with code. -The primary Tachi maintainer (henceforth referred to as `zkrising`, because that's their name) +The primary Tachi maintainer (henceforth referred to as `zk`, because that's their name) deals with the core of the codebase; things like importing scores, adding new features and most of the UI work is handled by them. Tachi actually doesn't really have a shortage of people who can write good code, and the core of the codebase -feature-wise is maintainable entirely by `zkrising` comfortably. +feature-wise is maintainable entirely by `zk` comfortably. -What **isn't** possible to maintain, is the sheer amount of things going on in every game! `zkrising` +What **isn't** possible to maintain, is the sheer amount of things going on in every game! `zk` cannot reasonably keep track of all the games we support and everything that's going on in them. -That's where you step in - people who actually actively *play* games on Tachi! By letting `zkrising` +That's where you step in - people who actually actively *play* games on Tachi! By letting `zk` know about things going on in your game - and even contributing things yourself - you help make their life easier and Tachi's support for your favourite game even better! - - -## For Novices... - -The Novice guides also cover things like how to get a proper code editing setup, how to use the terminal, and more. - -You should be able to follow these *even if* you don't know the first thing about programming! - -All of the novice guides are further down in this page. - ## Sounds good. Awesome! Start with the [Setup](./setup.md) guide. This will get Tachi running on your local PC, so you can test all your changes. \ No newline at end of file diff --git a/docs/docs/contributing/setup.md b/docs/docs/contributing/setup.md index ea1a3fa27e..4497caab1e 100644 --- a/docs/docs/contributing/setup.md +++ b/docs/docs/contributing/setup.md @@ -6,34 +6,52 @@ You don't *necessarily* need to have a working install to contribute - you could make documentation contributions without having anything running on your machine - but it's extremely helpful to be able to run Tachi's things while working on them. -## 0. Get some developer tools. +## 0. Install the basics -If you're an experienced programmer, you won't need this bit. +### VSCode -### Editor +We'll need a code editor so we can actually edit Tachi's code. -You'll need an editor to work in! +Please install [VSCode](https://code.visualstudio.com). +We'll use this as our editor because of it's excellent support for dev containers. -If you've only done a bit of programming in school, -you might be used to something like Visual Studio. +### Terminal -Sadly, Visual Studio is *not* a great editor for a codebase like Tachi. Visual Studio is -really good at writing C# (a language we don't use at all), -but its integration with TypeScript (the language we use) is quite poor. - -We **highly** recommend that you get [VSCode](https://code.visualstudio.com/). Especially -if you're a beginner! It's an extremely good editor, and has remarkably good integration -with everything we use. - -### Terminal - -You'll need a terminal to run commands in. For Linux and Mac users, you can just open +You'll also need a terminal to run commands in. For Linux and Mac users, you can just open a Terminal app. However, for Windows users we recommend installing the [Windows Terminal](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-gb&gl=GB). With a terminal open you can proceed to the next steps! +### Git + +You'll need `git` to clone Tachi to your machine. + +=== "Windows" + Install git [from the official website](https://git-scm.com/downloads). + +=== "Ubuntu, Debian" + Open a terminal and type this: + + ```sh + sudo apt install git + ``` + +=== "Arch, Manjaro" + Open a terminal and type this: + + ```sh + sudo pacman -S git + ``` + +=== "MacOS" + Open a terminal and type this: + + ```sh + brew install git + ``` + ## 1. Getting Docker. To set everything else up for local development, we'll use [Docker](https://docker.com). @@ -49,17 +67,21 @@ To set everything else up for local development, we'll use [Docker](https://dock [Please use the official Docker install guide.](https://docs.docker.com/engine/install/ubuntu/) === "Arch, Manjaro" + Open a terminal and type this: + ```sh sudo pacman -S docker docker-compose ``` === "MacOS" + Open a terminal and type this: + ```sh brew install docker docker-compose ``` !!! info - Docker is like a VM[^1]. It runs an entire Linux box to contain your software in, and generally sidesteps the whole "works on my machine" problem, by just shipping the entire machine. + Docker is like a VM[^1]. It runs an entire Linux box to contain your software in, and generally sidesteps the whole "works on some machines" problem. ## 2. Fork and pull the repo. @@ -75,6 +97,9 @@ Now, back to the terminal: If you do that, make sure you open the terminal in that folder, so your Tachi repo will save there! + +Open a terminal and type the following commands: + ```sh # This will create a folder called Tachi on your PC. # It'll create it wherever your terminal is currently open in. @@ -84,42 +109,57 @@ git clone https://github.com/YOUR_GITHUB_USERNAME/Tachi code Tachi ``` -## 3. Authenticate with Github. +## 3. Get into the container. -You'll need to authenticate with GitHub before you can actually push changes back -to your repository. +### What is a container? -There's a remarkably easy way to do this, using GitHub's `gh` tool. +Your personal machine could be running anything. Windows, Mac, Linux, whatever! +Tachi expects to be running on Linux and with specific versions of certain software running. +It's a huge pain to ask *you* to install that software and manage it yourself. +Plus, subtle differences between Windows and Linux cause problems _all_ the time. -=== "Debian, Ubuntu, WSL Ubuntu" - [Use the official Linux instructions.](https://github.com/cli/cli/blob/trunk/docs/install_linux.md) +As such, we work *inside* a docker container. This is sort of like having a Linux VM with everything set up perfectly for you. +I've spent quite a bit of time making this container user friendly, and it has so many nice things pre-installed for you. -=== "Arch, Manjaro" - ```sh - sudo pacman -S gh - ``` +Perhaps more importantly, the container has everything needed to run Tachi perfectly. Neat! -=== "MacOS" - ```sh - brew install gh - ``` +### Getting into it -Once you've installed it, type `gh auth` and follow the instructions. -You should now be properly authenticated! +With `VSCode` open to Tachi, install the [Dev Container](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension. -## 4. Start Tachi! +Then, hit `Ctrl+Shift+P` to view all commands, and run `Dev Containers: Rebuild and Reopen in Container`. -With a terminal open inside the `Tachi` folder you just cloned, run this command: +!!! warning + First time setup can take a very long time. + This depends on the performance of your machine, and whether you're using Windows or not. -=== "Windows" - ```bat - run start - ``` + You can click `view log` in the bottom right to see the progress of making the container. -=== "Linux, MacOS" - ```sh - ./run.sh start - ``` +### Working in the container + +**You want to do ALL your work inside the container.** +Doing thing outside of the container will cause issues or crashes. + +There is a subtle confusing trick here. We now want to use a terminal *inside* our container. +**Do not use a terminal outside of VSCode now.** + +To open a terminal inside `VSCode`, use `Ctrl+J` to open the bottom panel. +Inside there there should be a `TERMINAL` tab, click that. +There should be a `+` at the top right of the panel. Click that to open a new terminal! + +You should see a message starting with `Welcome to Tachi!`. Inside this shell, you have full access to Tachi and all of its utilities. + +## 4. Authenticate with Github. + +You'll need to authenticate with GitHub before you can actually push changes back +to your repository. + +Type `gh auth login` and follow the instructions. +You should now be properly authenticated! + +## 5. Start Tachi! + +With a terminal open inside the `Tachi` container you just cloned, run `just start`. The frontend will be running on `http://127.0.0.1:3000`. The backend will be running on `https://127.0.0.1:8080`. @@ -133,20 +173,9 @@ The backend will be running on `https://127.0.0.1:8080`. the server will silently be chomped by the browser. !!! tip - Open the `run.bat` or `run.sh` files in vscode to see what other commands are available. - -## 5. Editor Plugins - -If you're using VSCode as your editor (I *really* recommend it!) You'll want a couple -plugins. - -Namely, Install the ESLint plugin, and enable "Format On Save" in your settings. We use an [incredibly strict](https://github.com/CadenceJS/Cadence) plugin for ESLint, which catches a *ton* of programming errors and mistakes. By having it run in your editor, you can see your mistakes before you ever run the code, and have them automatically fix on save! - -!!! tip - With `Ctrl-Shift-P`, you can open VSCodes "Command Palette". This will let you search - for all the possible things VSCode can do. To open the settings, you can use `Ctrl-Shift-P` and search for "Settings". + Type `just` in the terminal to see other available commands. - It's ridiculously convenient, and there's a bunch of other stuff that VSCode helps with. +Navigate to http://127.0.0.1:3000 and check your Tachi instance! ## 6. OK, Now what.