Rajasekhar

Case StudyDodiscuss

Developing a high-performance community forum from the ground up using Rust and Astro.

Dodiscuss needed a robust backend capable of handling concurrent community interactions without the memory overhead of traditional frameworks. I architected this platform to push the boundaries of strict-typing and performance.

Project

Dodiscuss

Location

Telangana, India

Role

Lead Architect & Engineer

Dodiscuss forum homepage showing categorized discussion topics

Overview

A strictly-typed API designed for speed, safety, and scalability.

Many modern forums struggle with database bloat and slow client-side rendering. For Dodiscuss, I decoupled the architecture entirely: a headless, secure API written in Rust interfacing with PostgreSQL, serving data to a lightning-fast Astro frontend.

My role was full-stack architectural design. This included designing the database schemas, writing safe SQL joins via the `sqlx` driver, and ensuring the Astro frontend consumed the data predictably and securely via JWT authentication.

Tech Stack: Rust, Astro, PostgreSQL, Docker, Caddy, Tailwind CSS

Scope: Backend Architecture, Frontend Development, Secure Hosting

Engineering Process

I began by structuring the core Postgres database to naturally handle high-volume text search and relationships. Because community forums rely heavily on relational data (topics, posts, authors, and reactions), traditional ORMs often introduce N+1 query bottlenecks.

To solve this, I wrote explicit, optimized SQL queries using Rust's `sqlx` crate. A significant engineering challenge was navigating Rust's rigorous strict-typing rules when dealing with nullable relational data.

For example, rather than executing separate queries for every single post reaction, I engineered complex JSONB aggregations directly within PostgreSQL. This allowed the database to pack counts and emoji data natively, letting the Rust API instantly map the payload into `serde_json::Value` structs and deliver it to the frontend in milliseconds.

Detailed view of a Dodiscuss topic thread with emoji reactions

Frontend & Hosting

With the API securely locked down, I built the client using Astro. By prioritizing server-side rendering for topics and categories, the platform achieves excellent SEO out-of-the-box.

For interactive elements like the Markdown composer and optimistic UI reactions, vanilla JavaScript intercepts the user intent, updates the DOM instantly, and asynchronously communicates with the Rust backend.

The entire ecosystem is containerized via Docker and served through a Caddy reverse proxy, ensuring seamless SSL termination, strict header enforcement, and an easily replicable deployment pipeline.

Outcome

  • Engineered a highly concurrent Rust backend using sqlx, ensuring zero data loss during high-traffic discussions.
  • Bypassed slow database joins by leveraging strict JSONB mapping for optimistic UI elements, like emoji reactions.
  • Delivered a blazing-fast, SEO-optimized Astro frontend decoupled from the core API engine.

Dodiscuss stands as a testament to the power of selecting the right tool for the job. By favoring the memory safety of Rust and the shipping speed of Astro, the platform proves that complex, interactive applications do not require compromised performance.