Skip to content

Commit

Permalink
Add initial .cursorrules file to define project structure and guideli…
Browse files Browse the repository at this point in the history
…nes (#2027)
  • Loading branch information
sergekh2 authored Jan 12, 2025
1 parent ae4ba8b commit fe85f37
Showing 1 changed file with 97 additions and 0 deletions.
97 changes: 97 additions & 0 deletions core/.cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Instructions

Yor are an expert go developer.
Reference rules that are used in your answers.

# Project Overview

This is a module implementing a backend server for crypto chat application.

# Technology stack

- Go 1.23
- Protocol Buffers
- gRPC/gRPCWeb provided by connectrpc.com library
- HTTP/2 provided by x/net/http2 and net/http
- Ethereum client provided by go-ethereum library
- Postgres database provided by pgx/v5 library
- Logging provided by go's slog library
- require and assert test helpers provided by github.com/stretchr/testify
- OpenMetrics provided by prometheus
- Tracing provided by opentelemetry
- Command line parsing provided by cobra
- Flags parsing provided by viper
- Rust is used for the mls implementation

# Directory structure

|-cmd # command line commands
|-config # shared config struct
|-contracts # abigen generated contract bindings
| |-base # bindings for base chain contracts
| |-river # bindings for river chain contracts
| |-types # extra helpers for working with contract generatedtypes
|-docker # files for docker container
|-env # shared configuration fils for supproted environments
|-mls # server-side mls implementation in Rust
| |-mls-tools
| | |-crates # ignore
| | |-target # build artifacts: ignore
|-node # stream node implementation
| |-auth # on-chain auth implementation for river entitlements
| |-base # RiverError type and other shared helpers
| |-crypto # Classes to interact with blockchain
| |-dlog # slog extension to provide human-readable formatting
| |-events # in-memory cache for streams loaded from db, stream event parsing, miniblock generation
| |-http_client # http client for making requests to other nodes
| |-infra # shared infra code for node
| |-lint_extensions # shared lint extensions
| |-logs # ignore
| |-mls_service # mls service implementation
| | |-mls_tools # mls tools implementation
| |-nodes # code for tracking other nodes
| |-notifications # notification service implementation
| | |-push
| | |-sync
| | |-types
| |-protocol # generated protobuf bindings
| | |-protocolconnect # generated gRPC bindings
| |-protocol_extensions # extra protobuf helpers
| |-registries # helper classes for working with node and stream on-chain registries
| |-rpc # rpc server implementation
| | |-render # rpc render implementation
| | | |-templates # rpc render templates
| | |-sync # cross-node stream sync aggregator implementation
| | | |-client
| |-rules # rule engine implementation for adding events to streams
| |-run_files # ignore
| |-scrub # stream scrubber implementation
| |-shared # StreamId implementation and other shared types
| |-storage # stream storage in pg database implementation
| |-testutils # test helpers
| | |-dbtestutils # db test helper to create and clean up test db
| | |-mocks # mock implementations for testing
| | |-testcert # HTTPS test certs for testing
| | |-testfmt # test formatting helpers
| |-utils # shared utils
|-river_node # river node main
| |-version # version of the node
|-run_files # ignore: local test environment deployment files
|-scripts # support scripts
|-tools # support tools
| |-migrate_db # db migration tool
|-xchain # xchain implementation to check on-chain entitlements
| |-bindings
| | |-erc1155
| | |-erc165
| | |-erc20
| | |-erc721
| | |-erc777
| | |-ierc5313
| |-client_simulator
| |-common
| |-contracts
| |-entitlement
| |-examples
| |-server
| |-util

0 comments on commit fe85f37

Please sign in to comment.