Skip to content

projectcitybuild/web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project City Build

License: MPL 2.0 Build status


The official repository for Project City Build's homepage and related web services.

Stack

  • Backend: Laravel 11
  • Frontend: Laravel Blade, Vue 3
  • CI/CD: GitHub Actions

All branches, commits and pull-requests are continuously tested

Can I contribute?

Absolutely. Feel free to fork and send pull requests any time - we'd be thrilled to have some help.


Development

The development environment uses Dev Containers in combination with Docker.

Dev Environment

Ensure you have the following installed:

Important

Before opening this project in VSCode, copy the env example file: cp .env.example .env

Open the project in VSCode. When the corner pop up appears, click the button to re-open the project in a container.

Access the site at http://localhost

Accounts

2FA

By default, no real authenticator is required. For accounts that have 2FA enabled, the code is always 000000 (6 zeroes).

To use a real authenticator, set TOTP_BYPASS=false in .env

Captcha

By default, the Captcha will always pass on client and server side.

If you wish to test different situations, set CAPTCHA_SITE_KEY and CAPTCHA_SECRET_KEY in .env to an appropriate value from the below list.

https://developers.cloudflare.com/turnstile/troubleshooting/testing/

Mail

In local development, emails are forwarded to Mailpit instead of a real mail server.

Mail can be viewed at http://localhost:8025

Debugging

Laravel Telescope is available at http://localhost/telescope for non-production environments.

If for some reason you don't want this, set TELESCOPE_ENABLED=false in .env

Performance Monitoring

Laravel Pulse is available at http://localhost/pulse if logged-in as an admin account.

Data gathering is only enabled if you have PULSE_ENABLED=true in .env. This is false by default, as this is not particularly useful in a local environment.

Payments

Stripe CLI is installed as a container.

It redirects Stripe webhook events to your local containers, which normally wouldn't be possible without actually hosting the website somewhere public. This effectively allows us to complete a Stripe Checkout (eg. to test payments) and receive the payment data.

Ensure you set a name for your dev machine in .env

STRIPE_CLI_DEVICE_NAME=my-local-pc

Then run docker-compose exec stripe-cli stripe login while the containers are running.

Follow the prompts to authenticate.

From now on you can complete a payment normally. For example, go to the donation page and complete a purchase with a mock credit card.

Authentication needs to be done every 90 days due to token expiry.