How sridharravva/react-crud-with-asp.net-core-web-api works
Project type and purpose
• This is a full-stack CRUD application.
• Frontend: React.js app (create-react-app structure) using Redux for state management and Material-UI for form design.
• Backend: ASP.NET Core 3.0 Web API exposing CRUD endpoints backed by Entity Framework Core and a relational database.
• Use case: Manage DCandidate records (create, read, update, delete) from a React SPA via HTTP calls to the Web API.
File structure
A. Top-level
• WebAPI/ – .NET Core Web API solution
• react-app/ – React single-page application
B. WebAPI folder
• WebAPI.sln – Visual Studio solution
• Controllers/ – DCandidateController.cs + WeatherForecastController.cs (API endpoints)
• Models/ – DCandidate.cs, DonationDBContext.cs (EF Core entities & DbContext)
• Migrations/ – EF Core code-first migrations
• appsettings.json & appsettings.Development.json – configuration (DB connection, CORS)
• Startup.cs & Program.cs – middleware and host configuration
C. react-app folder
• public/ – index.html, manifest.json, static assets
• src/
– components/ – UI components (DCandidateForm, DCandidates list, useForm hook)
– actions/ – Redux action creators and API wrapper (api.js, dCandidate.js, store.js)
– reducers/ – Redux reducers (dCandidate.js, combined in index.js)
– App.js – root component, routes and layout
– index.js – React DOM bootstrap, store provider, service worker registration
README for additional insights
• Highlights: CRUD web methods, CORS enabled, real-time form validation, Redux integration, Material-UI design.