pascalallen.com

module
v0.0.0-...-b638ee3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: MIT

README

pascalallen.com

GitHub go.mod Go version Go Report Card GitHub Workflow Status GitHub GitHub code size in bytes

Logo

pascalallen.com is a containerized web application built with Kubernetes, Docker, RabbitMQ, Postgres, Go, React, TypeScript, Sass, Webpack, and WebAssembly. This ongoing project is designed, developed, deployed, and maintained by myself, Pascal Allen.

Motivation

The motivation behind this project was to develop a scalable and portable framework that can be used as a template for web apps and microservices. This project attempts to adhere to Effective Go and Organizing a Go module by the core Go dev team. Also used in the architecture of this project are various design principles such as CQRS, DDD, hexagonal architecture, and SOLID.

Core Project Tree

├── bin/       # Executable CLI commands
├── docs/      # Additional documentation
├── cmd/       # Go commands
├── internal/  # Supporting packages
├── scripts/   # Application-specific scripts
└── web/       # Web app components

Features

  • Configurable CI/CD pipeline
  • Helper scripts
  • MobX store
  • Google Wire DI container
  • JWT/HMAC authentication services
  • RabbitMQ message broker
  • Asynchronous command bus
  • Asynchronous event dispatcher
  • Middleware
  • Frontend linting with ESLint and Prettier
  • GORM ORM
  • Database seeds for permissions, roles, and users
  • Database seeder
  • Domain models
  • Kubernetes config with deployment instructions
  • API endpoints for authentication and registration
  • API endpoints for server-sent events
  • Repositories
  • WebAssembly template

Prerequisites

Development Environment Setup

Clone Repository
cd <projects-parent-directory> && git clone https://github.com/pascalallen/pascalallen.com.git
Copy & Modify .env File
cp .env.example .env
Bring Up Environment
bin/up <prod>

or (to watch for backend changes)

bin/watch

You will find the site running at http://localhost:9990/

Install JavaScript Dependencies
bin/yarn ci
Compile TypeScript with Webpack
bin/yarn build
Watch For Frontend Changes
bin/yarn watch
Take Down Environment
bin/down <prod>

Testing

Run tests and create coverage profile:

bin/exec go test ./... -covermode=count -coverprofile=coverage.out

Generate HTML file to view test coverage profile:

bin/exec go tool cover -html=coverage.out -o coverage.html

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL