A sample twitter app(pure CRUD), intended to be a practice project. Backend written in c#/.net core using simple
MVC pattern with EF Core as ORM, and client-side scripts written fully in Vue.js/typescript.
Not caring about front-end part, 100% slopping.
MVC- easy to start with. Planning to rewrite usingVSA.EF CoreasORMwithPostgreSQLas db provider.Serilog- logging. Uses bothConsoleandSeqas sinksCookie-based auth- reasonable to use with browser as a client.TestContainers+WebApplicationFactory- imitate real world scenario during testing.OpenApi+Scalar- UI is just so beautiful.Architecture Tests- set some rules in the source code. This ensures boundaries are not crossed, and that all methods/classes follow the same standard/approach.
- Docker and Docker Compose installed on your machine.
The project uses environment variables defined in .env. An example template is provided in .env.example.
-
Copy
.env.exampleto.env:cp .env.example .env
On Windows PowerShell:
Copy-Item .env.example .env -
Configure the variables in
.env:DB_PASSWORD: Password for the PostgreSQL database user (postgres).SEQ_FIRSTRUN_ADMINPASSWORD: Initial administrator password for the Seq logging server.SEQ_API_KEY: API key for Seq log ingestion.BASE_URL: Base URL for the application (defaults tohttp://localhost:3000).SMTP_HOST,SMTP_PORT,SMTP_USERNAME,SMTP_PASSWORD,SMTP_FROM_ADDRESS,SMTP_FROM_NAME: SMTP email server credentials used for sending account confirmation emails.
-
Build and start all services:
docker compose up --build
To run in the background (detached mode):
docker compose up -d --build
-
Access the running services:
- Web Application: http://localhost:3000
- Seq Log Dashboard: http://localhost:8081
- PostgreSQL Database: localhost:5432
-
Stop the services:
docker compose down
To also remove persistent database and log volumes:
docker compose down -v
- Want to implement
SSOscenarios usingGoogleprovider. - Use
Aspirefor integration tests. Will probably publish as v2. e2e tests
... And a bunch of other stuff.
The project is distributed under the terms of the MIT license.