dddforumv2
dddforumv2 copied to clipboard
DDDForum V2: Phases of Craftship
What is this?
This is the v2 of dddforum which we're using to demonstrate moving through the Phases of Craftship in The Software Essentialist.
Phases
- Code-First
- Best Practice-First
- Pattern-First
- Responsibility-First
- Value-First
The Best Practice-First Phase
At this level, the focus is on implementing the most valuable techniques from BDD, Continuous Delivery, Object-Oriented Design, TDD & so on.
The work we have to do here is broken into 4 key parts:
- | Automated Backend E2E tests
- | Test a Walking Skeleton (E2e UI to Backend Test Infrastructure)
- | Deploying the Skeleton to a Minimal Deployment Pipeline (w/ GitHub Actions, Render & Netlify)
- | Development Environment Refinements (for greater Discoverability & Understanding)
What's most important here?
Assuming we want to test everything from this folder, you can test/explore the following.
Pre-requisites
Docker
Ensure you've installed Docker on your machine and have it started.
This will allow us to run the local services we need (such as Postgres) without messy setup.
This keeps our development environments simple and reproducible.
Packages
npm ci
1. Automated Backend E2E tests
Automated tests are superior. Here's how we can do it on the backend.
Run the E2E tests
With the services built, you can now run the E2E tests.
npm run test:e2e
Note: This will start a PostgreSQL docker container, generate the Prisma client, run migrations, and start the backend server.
2. Test a Walking Skeleton (E2e UI to Backend Test Infrastructure)
A walking skeleton is a minimal slice of functionality through all of your major architectural components from the user's perspective.
Here's how you can test it out locally.
Step 1: Run the backend in a separate console.
npm run start:dev:backend
Note: This will start a PostgreSQL docker container, generate the Prisma client, run migrations, and start the backend server.
Step 2: Run the frontend server in a separate console.
npm run start:dev:frontend
3. Deploying the Skeleton to a Minimal Deployment Pipeline (w/ GitHub Actions, Render & Netlify)
Image incoming
... description incoming
4. Development Environment Refinements (for greater Discoverability & Understanding)
Image incoming
... description incoming
Other
Run the Backend Integration Tests
We run a few tests on the backend as well to prove that we can:
- Start and stop the web server
- Connect to the database
You can test these with:
npm run test:infra