+69
.env.dev
···
+45
-83
ATPROTO_GUIDE.md
···1. **DIDs (Decentralized Identifiers)** - Persistent user identifiers (e.g., `did:plc:xyz123`)+Coves uses a simplified, single-database architecture that leverages existing atProto infrastructure:+**Key Point**: Coves AppView only reads from the firehose and indexes data. It does NOT write to CAR files or manage repositories directly - the PDS handles that.·········
+14
-80
CLAUDE.md
···- Descriptive Naming: Use full words over abbreviations (e.g., CommunityGovernance not CommGov)-- [ ] Identify which atProto patterns apply (check ATPROTO_GUIDE.md or context7 https://context7.com/bluesky-social/atproto)-- [ ] Check if Indigo (also in context7) packages already solve this: https://context7.com/bluesky-social/indigo-- [ ] - Follow the two-database pattern: Repository (CAR files)(PostgreSQL for metadata) and AppView (PostgreSQL)+- [ ] **Record Types**: Define custom lexicons (e.g., `social.coves.post`, `social.coves.community`)······
+161
Makefile
···+.PHONY: help dev-up dev-down dev-logs dev-status dev-reset dev-db-up dev-db-down dev-db-reset test clean
-23
PROJECT_STRUCTURE.md
···This document provides an overview of the Coves project directory structure, following atProto architecture patterns.······
+144
docker-compose.dev.yml
···+# AppView subscribes directly to PDS firehose at ws://localhost:3001/xrpc/com.atproto.sync.subscribeRepos+PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX: ${PDS_PLC_ROTATION_KEY:-af514fb84c4356241deed29feb392d1ee359f99c05a7b8f7bff2e5f2614f64b2}+DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@host.docker.internal:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=disable+# DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@host.docker.internal:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=disable
+450
docs/LOCAL_DEVELOPMENT.md
···+export DATABASE_URL="postgresql://dev_user:dev_password@localhost:5433/coves_dev?sslmode=disable"+The Makefile provides convenient commands for development. Run `make help` to see all available commands:+1. **Build the Firehose Subscriber** - Create the AppView component that subscribes to the relay+2. **Define Custom Lexicons** - Create Coves-specific schemas in `internal/atproto/lexicon/social/coves/`
-104
internal/atproto/carstore/README.md
···-This package provides integration with Indigo's carstore for managing ATProto repository CAR files in the Coves platform.-CAR files are stored on the filesystem at the path specified during initialization (e.g., `./data/carstore/`). The storage is organized by Indigo's carstore implementation, typically with sharding for performance.-Current implementation supports repository-level operations. Record-level CRUD operations would require:
-100
internal/atproto/carstore/carstore.go
···-func (c *CarStore) ImportSlice(ctx context.Context, uid models.Uid, since *string, carData []byte) (cid.Cid, error) {-func (c *CarStore) ReadUserCar(ctx context.Context, uid models.Uid, sinceRev string, incremental bool, w io.Writer) error {-func (c *CarStore) CompactUserShards(ctx context.Context, uid models.Uid, aggressive bool) error {-func (c *CarStore) NewDeltaSession(ctx context.Context, uid models.Uid, since *string) (*carstore.DeltaSession, error) {
-122
internal/atproto/carstore/repo_store.go
···-func (rs *RepoStore) ImportRepo(ctx context.Context, did string, carData io.Reader) (cid.Cid, error) {-func (rs *RepoStore) ReadRepo(ctx context.Context, did string, sinceRev string) ([]byte, error) {
-127
internal/atproto/carstore/user_mapping.go
···
-143
internal/atproto/lexicon/social/coves/post/getFeed.json
···-"description": "Get a feed of posts. Use 'feed' parameter for global feeds (home/all) or 'community' + 'sort' for community-specific feeds. These modes are mutually exclusive.",-"description": "Get community feed for specific community (DID or handle, mutually exclusive with feed parameter)"-"description": "Sort order for community feeds (required when community is specified, ignored for global feeds)"
-201
internal/atproto/repo/wrapper.go
···-func NewWrapper(did string, signingKey interface{}, bs blockstore.Blockstore) (*Wrapper, error) {-func OpenWrapper(carData []byte, signingKey interface{}, bs blockstore.Blockstore) (*Wrapper, error) {-func (w *Wrapper) CreateRecord(collection string, recordKey string, record cbg.CBORMarshaler) (cid.Cid, string, error) {-func (w *Wrapper) UpdateRecord(collection string, recordKey string, record cbg.CBORMarshaler) (cid.Cid, error) {-if len(k) <= len(collection)+1 || k[:len(collection)] != collection || k[len(collection)] != '/' {
server
This is a binary file and will not be displayed.
+28
-34
tests/lexicon_validation_test.go
······+// e.g., ../internal/atproto/lexicon/social/coves/actor/profile.json -> social.coves.actor.profile·········