Your application will be served to http://localhost/
- bash (The setup script use .bashrc for aliases)
- Docker
- Docker Compose
- /!\ It won't work with the old version that uses
docker-compose
, you need to install the latest one that usedocker compose
, or add an alias in your.bash_aliases
file.
- /!\ It won't work with the old version that uses
- Yarn
Rename the .env.example
file to .env
and fill it with your own values
The following script will :
- Install the pre-commit hooks (
rubocop
andrspec
) - Add an alias named
kb
to the.dev/kb.sh
file - Add auto-completion for the
kb
alias
./setup.sh
Add the permissions to the .git
folder and execute the setup script
chmod -R 777 .git
./setup-macos.sh
Then, go to the frontend folder, and install the dependencies
cd frontend
yarn install
The app will be accessible at http://localhost/, don't specify the port, or you will get a CORS error during API calls.
Execute kb
to see the available commands
kb build
: Build the docker containerkb start
: Start / Restart the projectkb console
: Open a bash console in the backend containerkb test
: Run the testskb rubocop
: Run rubocopkb logs
: Show the docker containers logs
If you have any conflicts with the porte 3000, 4200 or 5432, you can change them in the .env
file.
It will change the ports served by the docker container (it's normal that the ports don't change in the logs)
Backend
- Rubocop (with rspec and factory-bot plugins)
- Rspec
- Crud concern
- Pagination for the index action
- Serializer
- Authentication with devise
- Pundit gem for authorization (roles)
- Scope to get deleted models
Frontend
- ESLint
- Prettier
- Tailwind
- ApiService
- CRUD methods
- Send authorization token
- Manage search params
- AuthService
- EntityManager (automatically fetch data from the API)
- Model
- Example page with some entity manager actions
- Shadcn library for the UI
- Zod lib added for form validation
- Vitest lib added for testing
TODO
- Migrate Rails.application.secrets to Rails.application.credentials