Hello! We'd love to see your contribution on this repository soon, even if it's just a typo fix!
Contributing means anything from reporting bugs, ideas, suggestion, code fix, even new feature.
Bear in mind to keep your contributions under the Code of Conduct for the community.
The issues page is a great way to communicate to us. Other than that, we have a Telegram group that you can discuss your ideas into. If you're not an Indonesian speaker, it's 100% fine to talk in English there.
Please make sure that the issue you're creating is in as much detail as possible. Poor communication might lead to a big mistake, we're trying to avoid that.
A big heads up before you're writing a breaking change code or a new feature: Please open up an issue regarding what you're working on, or just talk in the Telegram group.
You will need a few things to get things working:
- Node.js current version (as of now, we're using v18.16.0 as defined in the
.nvmrc
file). You can install it through the official Node.js download page, but we recommend using nvm or fnm. Here's a simple installation/setup guide, but you should really refer directly to the corresponding repository's README.
# If you want to install fnm
$ curl -fsSL https://fnm.vercel.app/install | bash
# Then simply use this command
$ fnm use
# OR if you want to install nvm
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
$ nvm use
-
This repo uses pnpm workspace to share the code between the backend and the frontend. There are multiple ways to install
pnpm
, please refer to the official installation guide for pnpm -
Docker and Docker Compose if you want to test the app using docker. (Optional)
- Fork this repository to your own Github account and clone it to your local device.
- Run
pnpm install
to install the dependencies needed across all workspaces. - You can use postman, insomnia or hoppscotch to create an API request.
Conventional commit is not required in this repo since this was supposed to be a toy project but ended up to be a kinda serious-ish thing. Do whatever you want with the commit message :)
It's really up to you to have an unit test or not. But if you do, just create one on the tests
directory, and run the test with:
# single run
pnpm test
# watch
pnpm test:watch
# collect coverage
pnpm test:coverage
We're using Vitest as the test runner.
Please run ESLint and Prettier with these commands so you're good on the CI process.
pnpm lint
pnpm fmt:write # or fmt:check if you don't want prettier to automatically format your code
And you're set!
pnpm install
- Your typical 5 million packages installation.pnpm start
- Start the fun stuff, make sure you've run the build step before running this.pnpm dev
- When you want stuff to be automagically reloaded.pnpm lint
- Check the files from your silly mistakes.pnpm lint:fix
- Fix your mistakespnpm fmt:check
- Feeling your code isn't pretty?pnpm fmt:write
- You like pretty formatted code, right?
pnpm build
- Build everything into a static files.
pnpm test
- Make sure everything works correctly.pnpm test:watch
- When you can't be bothered to runpnpm test
multiple times.pnpm test:coverage
- Make sure you don't miss anything.
npm run docker:build
- Prepare for 'it works on my machine' solution.npm run docker:run
- 'it works on my machine' is no more.