ARCV Service is the service portal and API for the ARCV Market trader app.
Set up your local environment:
switch to
- php version 8.2
- node lts/jod
- there's an
.nvmrcif you use nvm
- there's an
with Docker installed, enabled and running:
./script/setupThis will pull and setup containers as well as the app-specific fiddly bits, like keys and databases, with seeded staging data.
and run the local server:
./script/serverThe backend behaves differently based on request domain. You'll need to append your hosts 127.0.0.1 entry with
- arcv-service.test
- arcv-store.test
Once the server has started, the following containers will be running:
web(Nginx): http://localhost:8080app(PHP): application backendmailcatcher(MailCatcher):- Web interface: http://localhost:1081
- SMTP server: localhost:1026
db(MariaDB): localhost:33060 (username/password:laravel/secret)- a main seeded staging DB ("laravel")
- a test DB ("laravel_testing") for phpunit to use for complex queries
Now you should be able to view
- the admin portal at: http://arcv-service.test:8080/
- the voucher distribution store at: http://arcv-store.test:8080/
- use
./script/consoleto log in to the container, then./vendor/bin/phpunitto run tests.
- Clone the repo
- Create a database and user (homestead, sqlite or mysql)
- If not using Homestead or Valet - you will need to configure permissions on
storageandbootstrap/cache. See Laravel 12.x Installation for more info. - Copy
.env.exampleto.envand edit to local settings composer installphp artisan key:generatephp artisan migrate --seedphp artisan passport:keysto create keyschmod 600 ./storage/*.keyto set permissions correctlyphp artisan passport:client --password --name="Rose Vouchers Password Grant Client" --provider=usersto set the client in the DB- Add the "password grant" client id and secret to your
.env - Install packages for builds:
npm install - Run
npm run watchin the background during development to automatically compile assets when modifying code or changing commit
We suggest that you use the TLD .test as others, like .app may now be in the public domain and you will experience difficulty with respect to browser behavior over HTTP/HTTPS.
- Homestead optionally use the laravel vagrant vm manager for dev
- Database schema (diagram)
- Setting up reporting and scheduled tasks
- Voucher state transitions (diagram)
- Development cycle, sprints, hotfixes, tagging and releases
- Upgrading javascript
- Styling
- Resetting/reseeding the database with fixtures
- Creating test vouchers in bulk
- MVL exports, monthly/yearly voucher export
- Current infrastructure, live and staging droplet details