Skip to content

Repository files navigation

fáfnir

The name is inspired from Norse mythology, and refers to a dwarf named "Fáfnir" who transformed into a mythical Germanic dragon (a wyrm), so he can guard his treasure hoard of gold and such. He was later slain by Sigurd, but that's besides the point.

This is an educational project that serves as a hands-on demonstration of building a modern codebase exploring microservices architecture, asynchronous event-driven design, and best practices for creating a scalable, distributed application. I do not intend to use this project for other purposes and is mostly a playground for my learning, experimentation, and exploration.

Now for the application: It is designed to function as a stock trading platform, allowing users to simulate trading stocks in a controlled environment.

Documentation

For more detailed information, please refer to the documentation in the docs/ directory, or visit the following links below:

GuideDescription
ArchitectureProject structure, service overview
WebWeb application structure and components
DevelopmentSetup, local dev, make commands
DatabaseMigrations, Goose, DB details
GraphQLAPI schema, queries, mutations
DesignsExcalidraw designs and images
Ask DeepWikiAI-generated docs of fafnir (from Devin)

TODO

In no particular order:

  • Design and implement additional microservices (issue #15).
  • Integrate NATS for asynchronous events and messaging (issue #11).
    • Swapped from Pub/Sub to Worker Queues for message persistence with NATS JetStream (issue #20).
    • Implement more events across services than just user creation.
  • Create system architecture, network and data diagrams (upkeep as much as possible).
  • Build a simulation engine for orchestrating trading events (PR #32).
  • Add unit, integration, end-to-end and load/stress tests.
    • Perform load testing using Locust to simulate concurrent users (issue #8).
  • Explore Kubernetes local implementation (issue #5).
    • Use Helm for Kubernetes package management and manifests (issue #29).
  • Explore centralizing logging with Elasticsearch (issue #6).
    • Migrate to utilizing Loki for both Minikube and docker-compose (issue #29).
    • Migrate from log to log/slog for structured logging and better integration with Loki (issue #31).
  • Implement a frontend for the stock trading simulator/platform (check web/).
  • Implement a CI/CD pipeline for automated testing and Docker builds.
  • Production deployment via DigitalOcean and Traefik (issue #22).

About

a stock trading simulator platform made as a distributed system

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages