Skip to content

Latest commit

 

History

History
181 lines (118 loc) · 5.31 KB

README.md

File metadata and controls

181 lines (118 loc) · 5.31 KB

Rockket

Netlify Status Build, Run linter and tests

A small, carefully crafted todo app with a focus on user experience, built with ❤️ and angular.

Concept

Rockket is designed to reward the user when they complete a task with satisfying behaviour and little easter eggs to create a positive feedback loop and increase motivation. It is encouraged to break down a task into multiple sub-tasks so that you can cross of tasks more often and stay motivated.

Usage

Create an account and start using the web version today! Desktop and mobile apps are on the roadmap.

Known issues

A list of known issues can be found here: known-issues.md.

Contributing

  • Base branch: main
  • Only squash merging allowed to main
  • Before merging
    • Ensure all linter warnings are resolved or ignored with a description
    • Ensure the changeset is easy to understand (describe the changes in the PR)
  • Anything merged to main must be deployable

Running the app locally

Requirements

Installation & Preparation

  1. Clone the repo with

    git clone git@github.com:floydnant/rockket.git
  2. Install the dependencies

    npm i
  3. Create a database with the name rockket and the default credentials

  4. Add the environment variables by running npm run init-env which does the following:

    • Copy apps/rockket-backend/.env.sample -> apps/rockket-backend/.env
    • Link from apps/rockket-backend-e2e/.env to apps/rockket-backend/.env
  5. Run the db migrations

    nx run rockket-backend:db:migrate:dev

Running the app

Ensure postgres is up and running, then, to run the dev servers, run the serve targets for rockket-web and rockket-backend or simply npm run dev from the root to do both in one terminal.

The frontend is listening on localhost:4200 while the backend is listening on localhost:3000.

npm run dev

If you need to run the app on the local network (e.g. for testing on a different device, like a mobile phone) you can run the following and navigate to <Your local IP>:4200/ on the other device.

npm run dev:lan

Please note that if you want to run the serve targets separately, you have to specify the backend base url as an env var manually, i.e.

NG_APP_SERVER_BASE_URL=http://$(ipconfig getifaddr en0):3000 nx run rockket-web:serve:local-network
# and
nx run rockket-backend:serve

Monorepo structure @TODO

  • Libraries are located in the packages directory
  • Apps and e2e tests are located in the apps directory
  • Libraries have the tag type:lib

Running tests

You can run these commands in both the client and server directories.

All of the following commands support reruns on changes. Simply append --watch to the respective command and the tests rerun when the source code changes.

Unit tests

nx test rockket-web
nx test rockket-backend

Component tests

nx component-test rockket-web

End to end tests

nx e2e rockket-web-e2e
nx e2e rockket-backend-e2e

Linting and Formatting

To run linting and formatting for the whole codebase:

npm run lint # only lint
npm run lint:fix # lint and fix fixable linting issues

npm run format # only format

npm run fix # both format and fix linting issues

To run linting for a specific project:

nx lint rockket-web
nx lint rockket-backend

Type checks

For manual type checks without an LSP just run npm run dev or the respective serve or build targets for the project.

Further info on each project

You can also run nx show project <projectName> --json false for a list of targets (scripts to run).

Relevant documentation

Get in touch

Hi I'm Floyd Haremsa, you can reach me through floyd.haremsa@berlin-bytes.de, I'm happy to answer any questions you might have or just to have a chat.