Skip to content

Commit 3a36083

Browse files
committed
Initial constellation commit
1 parent 9d17c0f commit 3a36083

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+6714
-2
lines changed

.gitignore

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ NOTE.md
1111
/classifier/*.tsv
1212
Rocket.toml
1313
*.pem
14+
**/data/
1415

1516
# dotenv environment variable files
1617
.env
@@ -23,3 +24,134 @@ Rocket.toml
2324
/venv/
2425
rustc-*.txt
2526
/botenv/
27+
28+
# Node.gitignore
29+
30+
# Logs
31+
logs
32+
*.log
33+
npm-debug.log*
34+
yarn-debug.log*
35+
yarn-error.log*
36+
lerna-debug.log*
37+
.pnpm-debug.log*
38+
39+
# Diagnostic reports (https://nodejs.org/api/report.html)
40+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
41+
42+
# Runtime data
43+
pids
44+
*.pid
45+
*.seed
46+
*.pid.lock
47+
48+
# Directory for instrumented libs generated by jscoverage/JSCover
49+
lib-cov
50+
51+
# Coverage directory used by tools like istanbul
52+
coverage
53+
*.lcov
54+
55+
# nyc test coverage
56+
.nyc_output
57+
58+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
59+
.grunt
60+
61+
# Bower dependency directory (https://bower.io/)
62+
bower_components
63+
64+
# node-waf configuration
65+
.lock-wscript
66+
67+
# Compiled binary addons (https://nodejs.org/api/addons.html)
68+
build/Release
69+
70+
# Dependency directories
71+
node_modules/
72+
jspm_packages/
73+
74+
# Snowpack dependency directory (https://snowpack.dev/)
75+
web_modules/
76+
77+
# TypeScript cache
78+
*.tsbuildinfo
79+
80+
# Optional npm cache directory
81+
.npm
82+
83+
# Optional eslint cache
84+
.eslintcache
85+
86+
# Optional stylelint cache
87+
.stylelintcache
88+
89+
# Microbundle cache
90+
.rpt2_cache/
91+
.rts2_cache_cjs/
92+
.rts2_cache_es/
93+
.rts2_cache_umd/
94+
95+
# Optional REPL history
96+
.node_repl_history
97+
98+
# Output of 'npm pack'
99+
*.tgz
100+
101+
# Yarn Integrity file
102+
.yarn-integrity
103+
104+
# parcel-bundler cache (https://parceljs.org/)
105+
.cache
106+
.parcel-cache
107+
108+
# Next.js build output
109+
.next
110+
out
111+
112+
# Nuxt.js build / generate output
113+
.nuxt
114+
dist
115+
116+
# Gatsby files
117+
.cache/
118+
# Comment in the public line in if your project uses Gatsby and not Next.js
119+
# https://nextjs.org/blog/next-9-1#public-directory-support
120+
# public
121+
122+
# vuepress build output
123+
.vuepress/dist
124+
125+
# vuepress v2.x temp and cache directory
126+
.temp
127+
128+
# vitepress build output
129+
**/.vitepress/dist
130+
131+
# vitepress cache directory
132+
**/.vitepress/cache
133+
134+
# Docusaurus cache and generated files
135+
.docusaurus
136+
137+
# Serverless directories
138+
.serverless/
139+
140+
# FuseBox cache
141+
.fusebox/
142+
143+
# DynamoDB Local files
144+
.dynamodb/
145+
146+
# TernJS port file
147+
.tern-port
148+
149+
# Stores VSCode versions used for testing VSCode extensions
150+
.vscode-test
151+
152+
# yarn v2
153+
.yarn/cache
154+
.yarn/unplugged
155+
.yarn/build-state.yml
156+
.yarn/install-state.gz
157+
.pnp.*

Cargo.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
members = [ "rsky-common", "rsky-crypto","rsky-feedgen", "rsky-firehose", "rsky-identity", "rsky-labeler", "rsky-lexicon", "rsky-pds", "rsky-syntax", "rsky-jetstream-subscriber", "rsky-repo"]
2+
members = [ "rsky-common", "rsky-crypto","rsky-feedgen", "rsky-firehose", "rsky-identity", "rsky-labeler", "rsky-lexicon", "rsky-pds", "rsky-syntax", "rsky-jetstream-subscriber", "rsky-repo", "constellation/backend", "constellation/frontend"]
33
resolver = "2"
44

55
[workspace.dependencies]
@@ -23,6 +23,17 @@ rsky-crypto = {path = "rsky-crypto", version = "0.1.1"}
2323
rsky-syntax = {path = "rsky-syntax", version = "0.1.0"}
2424
rsky-common = {path = "rsky-common", version = "0.1.1"}
2525
rsky-repo = {path = "rsky-repo", version = "0.0.1"}
26+
rsky-firehose = {path = "rsky-firehose", version = "0.2.0"}
2627

2728
[profile.release]
2829
debug = 2 # Or any level from 0 to 2
30+
31+
[profile.wasm-dev]
32+
inherits = "dev"
33+
opt-level = 1
34+
35+
[profile.server-dev]
36+
inherits = "dev"
37+
38+
[profile.android-dev]
39+
inherits = "dev"

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ rsky (/ˈrɪski/) is intended to be a full implementation of [AT Protocol](https
4646
- `rsky-firehose`: Firehose consumer.
4747
- `rsky-jetstream-subscriber`: Firehose consumer for Jetstream.
4848
- `rsky-labeler`: Firehose consumer that labels content.
49+
- `Constellation`: An AT Protocol app-view designed for local-only posting and global views.
4950

5051
## About AT Protocol
5152

@@ -60,7 +61,7 @@ The Authenticated Transfer Protocol ("ATP" or "atproto") is a decentralized soci
6061

6162
- [x] Feedgen and firehose consumer
6263
- [x] PDS implementation
63-
- [ ] Frontend bluesky client
64+
- [x] Frontend bluesky client
6465
- [ ] Feedgen admin client
6566

6667
## Backers

constellation/README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Constellation
2+
3+
**⚠️ Warning:** *This project is currently very unstable—more of a concept than a working prototype. Use cautiously and expect frequent changes.*
4+
5+
An AT Protocol app-view designed for local-only posting and global views. Constellation is inspired by [Hometown](https://github.com/hometown-fork/hometown) from the Fediverse, offering a space for communities to engage without their posts automatically federating. While AT Protocol prioritizes public content, Constellation acknowledges the need for private, local-first social interactions.
6+
7+
## Features
8+
9+
- **Local-only posting**: Posts are stored on-disk per instance and do not federate out.
10+
- **AT Protocol integration**: Users authenticate via OAuth, leveraging decentralized identity and their own PDS.
11+
- **Moderation compatibility**: Integrates with Ozone and third-party moderation services.
12+
- **Cross-platform support**: Built using [Dioxus](https://github.com/DioxusLabs/dioxus) for flexibility across platforms.
13+
- **Global views**: Constellation can consume the public firehose to provide a broader experience while keeping local communities intact.
14+
15+
## Roadmap
16+
17+
### v1 Implementation
18+
- Store local-only posts in a central database on the app-view.
19+
- Ensure compatibility with existing AT Protocol APIs.
20+
- Allow Constellation admins to manage moderation policies for their instance.
21+
- Support instance-level moderation and integration with external moderation services.
22+
- **Arbitrary group management**: Initially supporting list-based groups, with future expansion into PDS-based and domain-based group management.
23+
24+
### Future Considerations
25+
- Migrate to AT Protocol's private state model when consensus is reached.
26+
- Introduce "namespaces" for structuring private and public data within AT Protocol.
27+
- Enable feed generators for local-only posts.
28+
- Support authentication and authorization mechanisms for private content access.
29+
30+
## Development
31+
32+
### Frontend Setup
33+
34+
Constellation's frontend uses Dioxus and Tailwind CSS.
35+
36+
#### Tailwind Installation
37+
1. Install npm: [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
38+
2. Install the Tailwind CSS CLI: [Tailwind installation](https://tailwindcss.com/docs/installation)
39+
3. Run the following command to start the Tailwind CSS compiler:
40+
41+
```bash
42+
npx tailwindcss -i ./input.css -o ./assets/tailwind.css --watch
43+
```
44+
45+
### Running the App
46+
47+
To start developing with the default platform:
48+
49+
```bash
50+
dx serve
51+
```
52+
53+
To specify a platform (e.g., desktop):
54+
55+
```bash
56+
dx serve --platform desktop
57+
```
58+
59+
## Privacy & Moderation
60+
61+
While local-only posts do not federate, Constellation prioritizes moderation to ensure safe community interactions. Each instance is responsible for removing harmful or illegal content. Integration with external moderation services, such as Ozone, allows for scalable and flexible moderation policies.
62+
63+
## Future of Private Content in AT Protocol
64+
65+
The AT Protocol community is [actively discussing](https://github.com/bluesky-social/atproto/discussions/3363#discussioncomment-12099116) the introduction of private repositories and namespaces. The proposed model would:
66+
- Introduce "namespaces" to store records privately in a user’s PDS.
67+
- Differentiate between public and private storage, ensuring access control by DIDs.
68+
- Provide a structured, scalable system for handling private data.
69+
- Support different access control levels, including collection-level and record-level permissions.
70+
- Maintain AT Protocol's addressable record system while enabling private interactions.
71+
72+
While these features are not yet finalized, Constellation aims to integrate them as they become part of the AT Protocol standard.
73+
74+
## Future Vision
75+
76+
These are early ideas, not guarantees, of potential features and services:
77+
78+
- **Managed Hosting Services**: Blacksky Algorithms may offer hosting solutions that allow community builders to quickly spin up Constellation instances without worrying about infrastructure, letting them focus on building and engaging their communities.
79+
- **Server Boost Features**: Enhanced hosting capabilities such as video hosting and increased resources tailored to community-specific needs.
80+
- **Community Funding Integrations**: Potential integrations with platforms like [Open Collective](https://opencollective.com/) to empower community members to financially support their community.
81+
- **Customizable Community Badges**: Community-specific configurable badges to recognize and reward member contributions (e.g., "Early Adopter", "Helpful Guide").
82+
83+
These ideas reflect a commitment to empowering community creators, providing them with robust tools, flexibility, and resources needed for effective community building.
84+
85+
## License
86+
87+
Constellation is released under the [Apache License 2.0](../LICENSE).
88+

constellation/backend/Cargo.toml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[package]
2+
name = "backend"
3+
version = "0.0.1"
4+
edition = "2024"
5+
6+
[dependencies]
7+
axum = { version = "0.8.1",features = ["macros"] }
8+
tokio = { workspace = true }
9+
surrealdb = { version = "2.2.1", features = ["kv-rocksdb"] }
10+
rsky-lexicon = { workspace = true }
11+
serde = { workspace = true }
12+
serde_json = { workspace = true }
13+
serde_cbor = { workspace = true }
14+
uuid = { version = "1", features = ["v4"] }
15+
tower-http = { version = "0.6.2", features = ["fs", "cors"] }
16+
chrono = "0.4.40"
17+
atrium-identity = "0.1.0"
18+
thiserror = "2.0.12"
19+
sha2 = { workspace = true }
20+
rand = { workspace = true, features = ["small_rng"] }
21+
atrium-api = { version = "0.25.0", default-features = false }
22+
atrium-common = "0.1.0"
23+
atrium-xrpc = "0.12.1"
24+
base64 = "0.22.1"
25+
ecdsa = { version = "0.16.9",features = ["signing"] }
26+
elliptic-curve = "0.13.8"
27+
jose-jwa = "0.1.2"
28+
jose-jwk = { version = "0.1.2", features = ["p256"] }
29+
p256 = { version = "0.13.2",features = ["ecdsa"] }
30+
reqwest = { version = "0.12.12", optional = true }
31+
serde_html_form = "0.2.7"
32+
trait-variant = "0.1.2"
33+
hickory-resolver = "0.24.1"
34+
anyhow = "1.0.97"
35+
tokio-tungstenite = "0.23.1"
36+
futures = "0.3.31"
37+
rsky-firehose = { workspace = true }
38+
tracing = "0.1.41"
39+
tokio-stream = { version = "0.1.17",features = ["sync"] }
40+
axum-extra = { version = "0.10.0", features = ["typed-header"] }
41+
headers = "0.4"
42+
tower = "0.5.2"
43+
44+
[dev-dependencies]
45+
p256 = { version = "0.13.2",features = ["pem"] }
46+
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
47+
48+
[[bin]]
49+
name = "backend"
50+
path = "src/main.rs"
51+
52+
[features]
53+
default = ["default-client"]
54+
default-client = ["reqwest/default-tls"]

0 commit comments

Comments
 (0)