- .NET 9 Web APIs (Backend)
- Entity framework core (ORM)
- Sqlite (database)
- React 19 (frontend)
- Lucide react (icons)
- React router (routing)
- React hook form (form and validation)
- React hot toast (toaster)
- Clone the project
git clone https://github.com/rd003/DotnetReactCrud
- Change directory
cd DotnetReactCrud
- Visit backend project's directory
cd Backend/Backend/
- Run migrations
dotnet ef database update
- Run backend project
dotnet run
Keep backend project running. Open a new tab in terminal
- Visit frontend project's directory
cd path-to-project-directory/
cd client
- Install dependencies
npm i
- Run project
npm run dev
- Visit to the route
http://localhost:5173
in the browser.
Note: If you are running this project on linux, then you might get this error. I got this on linux mint however it was running fine in windows 11 machine.
Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try npm i again after removing both package-lock.json and node_modules directory.
I resolved it with these steps:
- Delete the problematic files:
rm -rf node_modules
rm package-lock.json
- Install dependencies again
npm i
- Run project again wiht
npm run dev