/traQ

traQ - traP Internal Messenger Application Backend

Primary LanguageGoMIT LicenseMIT

traQ - traP Internal Messenger Application

GitHub release CI release codecov Dependabot Status swagger

Backend: this repository

Frontend: traQ_S-UI

Development environment

Requirements

  • go 1.14
  • git
  • bash
  • make
  • docker
  • docker-compose

Setup Local Server with docker

First Up (or entirely rebuild)

make update-frontend && make up

Now you can access to

  • http://localhost:3000 for traQ
    • admin user id: traq
    • admin user password: traq
  • http://localhost:3001 for Adminer
  • http://localhost:6060 for traQ pprof web interface
  • 3002/tcp for traQ MariaDB
    • username: root
    • password: password
    • database: traq

Rebuild traQ

make up

Update frontend

make update-frontend or make reset-frontend

Destroy Containers and Volumes

make down

Development

Build executable file

make

Download and Install go mod dependencies

make init

github.com/google/wire/cmd/wire and github.com/golang/mock/mockgen will be installed.

Rerun automated code generation (wire, gomock)

make gogen

Testing

  1. To run mysql container for test by make up-test-db
  2. make test

You can remove the container by make rm-test-db

Code Lint

make lint (or individually make golangci-lint, make swagger-lint)

Powered by:

Generate And Lint DB Schema Docs

make db-gen-docs make db-lint

tbls is used for generating schema docs.

Test mysql container need to be running by make up-test-db.

License

Code licensed under the MIT License.

This application uses twemoji's SVG images as Unicode emoji stamps. twemoji by 2019 Twitter, Inc and other contributors is licensed under CC-BY 4.0.