Skip to content

bakboem/microsoft-fullstack-with-nextjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Online Order System - Next.js with gRPC and ASP.NET Core

As a project planned for 2025, this repository will implement an Online Order System using a combination of modern web technologies to provide a performant, scalable, and maintainable solution.

Tech Stack

Frontend: Next.js

  • Framework: React-based framework with support for server-side rendering (SSR) and static site generation (SSG).
  • Communication Protocol: gRPC-Web for browser-to-server communication.
  • Dynamic Rendering: Supports CSR (Client-Side Rendering) for dynamic user interactions.

Backend: ASP.NET Core

  • Framework: High-performance, cross-platform framework for building APIs and gRPC services.
  • Communication Protocol: gRPC for server-to-server communication.
  • Service Design:
    • User Management (e.g., registration, login).
    • Order Management (e.g., create, update, status tracking).
    • Product Management (e.g., add, update, delete).

Database: SQL Server

  • Stores and manages user, product, and order data.
  • Integration with Entity Framework Core for ORM capabilities.

Messaging System: Kafka

  • Handles WebSocket-based real-time notifications.
  • Enables event-driven architecture for order updates and notifications.

System Architecture

1. Workflow Overview

  • Page Initialization (SSR):

    • Next.js server communicates with the ASP.NET Core backend using native gRPC.
    • Fetched data is rendered server-side and sent to the browser as part of the HTML.
  • User Interactions (CSR):

    • Browser communicates with the ASP.NET Core backend using gRPC-Web.
    • Dynamic updates are fetched and rendered without reloading the page.
  • Real-Time Updates:

    • Kafka handles WebSocket messages for real-time order status updates.
    • Notifications are pushed to users when their order status changes.

2. Communication Flow

  1. Frontend to Backend:
    • gRPC-Web for browser communication (Next.js client).
    • Native gRPC for server-to-server communication (Next.js SSR).
  2. Backend to Database:
    • SQL Server via Entity Framework Core.
  3. Real-Time Messaging:
    • Kafka streams for WebSocket notifications.

Development Environment

Requirements

  • Node.js: For running Next.js and React.
  • .NET SDK: For ASP.NET Core development.
  • SQL Server: Database for persistent data.
  • Kafka: Event-streaming platform for real-time updates.
  • Protobuf Compiler (protoc): For generating gRPC service and client code.

About

ASP.NET + Next.js (SSR) + gRPC Original + gRPC Web + Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published