rewrite: quickslice backend + cloudflare pages frontend#72
Conversation
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- build quickslice from source at v0.17.3 (includes sub claim fix) - frontend on cloudflare pages, backend on fly.io - add readme with deployment docs - clean up old deployment artifacts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Pull Request Review: Quickslice Backend RewriteOverviewThis is a substantial architectural rewrite replacing the custom Rust implementation with Quickslice (Gleam-based backend) + vanilla JS frontend. The changes are well-documented and the migration appears thoughtfully executed. 🟢 StrengthsArchitecture & Design
Code Quality
🟡 Areas for Improvement1. Security ConcernsCritical - Dockerfile line 18: ENV GIT_TERMINAL_PROMPT=0While this disables interactive prompts, the Dockerfile clones from a public repo without commit hash verification. Consider: # Pin to specific commit for reproducibility and security
RUN git clone --depth 1 https://github.com/bigmoves/quickslice.git /build && \
cd /build && \
git fetch --depth 1 origin v0.17.3 && \
git checkout v0.17.3 && \
git verify-tag v0.17.3 # if tags are signedMedium - GraphQL Query Injection (app.js:73-90): query: `
query GetPreferences($did: String!) {
ioZzstoatzzStatusPreferences(
where: { did: { eq: $did } }
first: 1
) {Good use of parameterized queries with variables! However, ensure Quickslice backend validates/sanitizes the Low - External Script Loading (index.html:9): <script src="https://cdn.jsdelivr.net/gh/bigmoves/quickslice@main/quickslice-client-js/dist/quickslice-client.min.js"></script>Loading from <script src="https://cdn.jsdelivr.net/gh/bigmoves/quickslice@v0.17.3/quickslice-client-js/dist/quickslice-client.min.js" integrity="sha384-..." crossorigin="anonymous"></script>Add SRI (Subresource Integrity) hash for additional security. 2. Performance Considerationsapp.js - Multiple GraphQL Queries:
Recommendation: // Use cursor-based pagination for better performance
const loadMore = async () => {
const lastCursor = feedData[feedData.length - 1]?.cursor;
// Use 'after: $cursor' instead of offset
};Emoji Data Loading:
3. Code Quality Issuesapp.js:16 - Hardcoded Configuration: const CONFIG = {
server: 'https://zzstoatzz-quickslice-status.fly.dev',
clientId: 'client_2mP9AwgVHkg1vaSpcWSsKw',
};These should be environment variables or build-time configuration for different environments (dev/staging/prod). Error Handling Gaps:
Magic Numbers:
4. Potential BugsRace Condition in Settings (app.js:107-135): Timezone Handling: Lexicon Validation (lexicons/status.json:16): "maxLength": 64For emoji field allows 64 chars, but custom emoji format 5. Deployment & Infrastructurefly.toml:14 - Environment Variables: DATABASE_URL = 'sqlite:/data/quickslice.db'SQLite on a single machine is fine for personal use, but document scaling limitations in README. Missing Health Checks: [http_service.checks]
[http_service.checks.health]
grace_period = "10s"
interval = "30s"
method = "GET"
path = "/health"Dockerfile Multi-stage Concerns:
6. Testing & DocumentationMissing:
📋 Recommendations SummaryHigh Priority
Medium Priority
Low Priority
✅ Final VerdictThis is a well-executed rewrite that modernizes the architecture and removes significant custom code complexity. The frontend is clean and the Quickslice integration is appropriate. Approval Status: Approved with suggestions ✓ The security and performance concerns noted above are typical for a v1 rewrite and none are blocking. I recommend addressing the high-priority items (particularly dependency pinning and error handling) before or shortly after merging. Great work on the comprehensive rewrite! The move to Quickslice should significantly reduce maintenance burden. Review generated by Claude Code |
Pull Request ReviewThis PR represents a complete architectural rewrite from Rust to quickslice (Gleam/Erlang) backend with a vanilla JS SPA frontend. Overall execution is solid with modern patterns, but there are critical security issues that must be addressed before merge.
|
Pull Request Review: Quickslice RewriteOverviewThis is a significant architectural rewrite that moves from a custom Rust backend to the Quickslice framework (Gleam/Erlang) with a vanilla JavaScript SPA frontend. The PR successfully implements the core status app functionality with improved features. StrengthsArchitecture
Features
Critical Issues1. XSS in Markdown Rendering (site/app.js:1067-1075)Doesn't prevent javascript: or data: URIs. Fix: Add protocol validation if (!safeUrl.match(/^https?:\/\//i)) return match;2. External Resources (site/app.js:531)Loading bufo images without CSP.
3. No Input ValidationStatus text length not validated before submission.
Performance Issues
Code Quality
Config Issues
Recommendations PriorityHigh (Before Production)
Medium
OverallWell-executed rewrite with modern architecture. Address security issues (XSS, validation) before production. The Quickslice migration is a good decision. Recommendation: Approve with changes - fix critical security issues first. Great work! 🚀 |
summary
complete rewrite using quickslice as the backend instead of custom rust.
what's new
deployments
notes
builds quickslice from source at v0.17.3 to include the
subclaim fix for oauth token response.🤖 Generated with Claude Code