๐Ÿš€ Midnight Challenge | Build & Run a Sample dApp with React, Flask & Docker
Pravesh Sudha

Pravesh Sudha @pravesh_sudha_3c2b0c2b5e0

About: AWS Community Builder & IBM Champion Bridging critical thinking and innovation, from philosophy to DevOps.

Location:
India
Joined:
Jul 19, 2024

๐Ÿš€ Midnight Challenge | Build & Run a Sample dApp with React, Flask & Docker

Publish Date: Sep 6 '25
27 11

This is a submission for the Midnight Network "Privacy First" Challenge - Enhance the Ecosystem prompt

What I Built

I built a beginner-friendly tutorial and sample dApp that demonstrates how developers can interact with a Midnight-like blockchain environment.

The project simulates wallet balances and transactions using lightweight mock services, paired with a React frontend. This allows developers to understand the flow of building a dApp โ€” from backend services to UI integration โ€” without needing the full complexity of setting up a live Midnight node.

The tutorial lowers the barrier to entry by providing:

  • A step-by-step YouTube video walkthrough
  • A Dockerized setup for easy spin-up
  • Clean and well-documented React + API code
  • A working demo of sending transactions and fetching balances

This way, developers can learn the concepts and workflows of building on Midnight, then extend or replace the mocks with real Midnight tools when ready.


Demo

๐Ÿ”— GitHub Repository (change dir to midnight-challenge):

GitHub logo Pravesh-Sudha / dev-to-challenges

Registry to Store all my code related to Dev.TO Challenges

๐Ÿ—๏ธ Dev.to Challenges โ€“ by Pravesh Sudha

This repository contains my submissions for various Dev.to Challenges. Each folder in this repo includes a hands-on project built around specific tools, APIs, or themes โ€” from infrastructure to frontend and AI voice agents.


๐Ÿ“ Projects

โš™๏ธ pulumi-challenge/

An infrastructure-as-code project built using Pulumi.
It automates cloud infrastructure setup using Python and TypeScript across AWS services.

๐ŸŽจ frontend-challenge/

A UI/UX-focused project that demonstrates creative frontend solutions using HTML, CSS, and JavaScript โ€” optimized for responsiveness and accessibility.

๐Ÿ“ฉ postmark-challenge/

A transactional email solution built with the Postmark API, showcasing email templates, delivery tracking, and webhook handling.

๐Ÿง  philo-agent/

A voice-based AI Philosopher built with AssemblyAI + Gemini โ€” part of the Worldโ€™s Largest Hackathon.


๐Ÿ—‚๏ธ Project Structure

dev-to-challenges/
โ”‚
โ”œโ”€โ”€ pulumi-challenge/
โ”œโ”€โ”€ frontend-challenge/
โ”œโ”€โ”€ postmark-challenge/
โ”œโ”€โ”€ philo-agent/
โ””โ”€โ”€ README.md
Enter fullscreen mode Exit fullscreen mode

๐Ÿ™Œ Why This Repo?

This repo is my playground to:

  • โ€ฆ

โ–ถ๏ธ YouTube Video Walkthrough:

Application Logs:

Application UI:


How I Used Midnight's Technology

Instead of directly integrating with Midnight (which requires a more advanced setup), I built mock connectors and an indexer that emulate Midnight-like services.

The tutorial introduces developers to:

  • Connector mock โ†’ simulates how dApps send transactions
  • Indexer mock โ†’ simulates how balances and data can be queried
  • React dApp frontend โ†’ provides a wallet + transaction flow for interaction

By following this tutorial, developers learn the patterns of Midnight development โ€” transaction flow, balance querying, and UI wiring โ€” without worrying about infrastructure overhead. Once familiar, they can swap the mocks for actual Midnight SDKs or APIs, making the transition seamless.


Developer Experience Improvements

One of the biggest hurdles for new developers in blockchain ecosystems is onboarding โ€” the process of setting up environments, understanding the transaction flow, and connecting frontend applications to backend services.

This tutorial improves the developer experience by:

  • Reducing setup friction โ†’ Everything runs with docker-compose up --build, no manual environment wrangling.
  • Clear learning flow โ†’ Explains the connector, indexer, and dApp step by step, so developers understand why each part matters.
  • Practical hands-on example โ†’ Developers can immediately send a transaction, fetch balances, and see results in a styled UI.
  • Extendable foundation โ†’ While the project uses mocks for simplicity, the structure mirrors how a real Midnight dApp would be built, making it easy to swap in real APIs later.

๐Ÿ‘‰ This means developers can quickly experiment and learn the Midnight development workflow before diving into advanced integrations โ€” lowering the barrier to entry and boosting confidence.


Why This Matters

When developers try a new blockchain ecosystem, the biggest hurdle is setup and integration. This project lowers that barrier by providing a ready-to-run starter kit.

With one command, developers can:

  • Experiment with transactions.
  • Query balances.
  • Visualise how a dApp interacts with Midnight components.

This makes it significantly easier for more developers to onboard into the Midnight ecosystem.


Set Up Instructions / Tutorial

  • Clone the repository:
   git clone https://github.com/Pravesh-Sudha/dev-to-challenges.git
   cd dev-to-challenges/midnight-challenge
Enter fullscreen mode Exit fullscreen mode
  • Run the project with Docker Compose:
   docker-compose up --build
Enter fullscreen mode Exit fullscreen mode
  • Access the dApp in your browser at:
   http://localhost:3000
Enter fullscreen mode Exit fullscreen mode
  • Use the UI to:

    • Get balances from the indexer mock.
    • Send mock transactions via the connector mock.

Conclusion

This project is more than just a sample dApp โ€” itโ€™s a step-by-step tutorial that makes it easier for developers to get started building on the Midnight ecosystem.

By combining clear documentation, a Dockerized setup, and an easy-to-follow YouTube walkthrough, Iโ€™ve created a hands-on learning experience for new developers. It demonstrates how transactions, balances, and UI flow can come together in a Midnight-like application โ€” without the complexity of setting up the entire blockchain environment first.

My goal was to lower the barrier to entry and give developers a working reference they can learn from, adapt, and expand into real-world Midnight projects.

๐ŸŒ Connect with me:

Comments 11 total

  • Long Phan
    Long PhanSep 10, 2025

    nice, best tutorial ever!

  • InstaSDR.ai
    InstaSDR.aiSep 10, 2025

    I like it, very interesting

  • Roshan Sharma
    Roshan SharmaSep 10, 2025

    Really cool post, bundling a sample dApp with React + Flask inside Docker makes onboarding so much easier.
    Any tips on scaling this setup beyond the mock data?

  • Corporate Optics
    Corporate Optics Sep 10, 2025

    Recommended!

  • Umang Suthar
    Umang SutharSep 12, 2025

    This is a great approach to lowering the entry barrier for developers.
    Too often, blockchain ecosystems feel overwhelming because of setup complexity. Mocks and Dockerized flows like this give people the confidence to start experimenting right away.

    What really stands out here is how it mirrors real-world patterns without the heavy infrastructure load. That balance between simplicity and accuracy is exactly what helps ecosystems grow faster.

    • Pravesh Sudha
      Pravesh SudhaSep 12, 2025

      Thanks for the appreciation, I wish the judges see it the same way ๐Ÿ˜…๐Ÿคž

  • Sanjay Singh
    Sanjay SinghSep 12, 2025

    Hey guys, checkout my site stackdevflow.com/series/machine-le...

Add comment