5S audits promote more efficient operations. In simple terms, 5S methodology helps keep the workplace organized and clean. This app allows you perform an audit to ensure the 5S approach is followed.
This application is still in development. See Roadmap.
- Create and browse audits
- API: JWT authentication with refresh tokens
- API: Paging, sorting
- API: Security headers
Make sure you have installed the following prerequisites:
-
VS Code (optional but preferred)
-
SQLiteStudio (or other software to browse SQLite database)
git --version
# => git version 2.34.0.windows.1node --version
# => v20.11.1
npm --version
# => 10.2.4dotnet --version
# => 8.0.111dotnet ef --version
# => 9.0.0- Clone the repository
git clone https://github.com/schwastek/5s-audit-app.git- Install npm packages of React
cd client
npm clean-install- Or install npm packages of Angular
cd client-angular
npm clean-install- Generate SSL certificate for Angular local development
cd client-angular/ssl
dotnet dev-certs https --export-path ./certificate.pem --no-password --trust --format PEMWhen you start ASP.NET Core web API, it won't launch React or Angular client app automatically.
Both frontend and backend must be started manually.
Run React frontend app:
cd client
npm startOr run Angular frontend app:
cd client-angular
npm startRun ASP.NET Core web API:
cd Api
dotnet runIn a web browser, navigate to http://localhost:3000 (React) or https://localhost:4200 (Angular).
Log in with email and password:
john@test.comPa$$w0rd
Swagger UI is available at https://localhost:5000/swagger/index.html after running the application.
To execute protected endpoints you need to authenticate yourself first.
Execute /api/account/login endpoint to obtain the access token.
Then click Authorize button and paste the access token in the following format: Bearer xxxxxxxx.yyyyy.zzzzz.
Log in
Create new audit
Browse audits
| API | Description |
|---|---|
GET /api/audits |
Get a list of audits (paged by default) |
GET /api/audits?orderBy=author asc&pageSize=5&pageNumber=1 |
Get a list of audits (paged and sorted) |
GET /api/audits/{{id}} |
Get an audit by ID |
POST /api/audits |
Create an audit |
POST /api/actions |
Add an action to audit |
PUT /api/actions/{{id}} |
Update an action |
DELETE /api/actions/{{id}} |
Delete an action |
GET /api/questions |
Get a list of questions |
POST /api/account/login |
Log a user in |
POST /api/account/refreshToken |
Refresh token for a logged in user |
GET /api/account |
Get the current logged in user |
POST /api/account/register |
Register a new user |
SQLite database file is created in the special "local" folder for your platform.
Use Run command below (WIN+R) to open the "local" folder on Windows: C:\Users\{Username}\AppData\Local.
%LocalAppData%
You can run Data console application to seed database:
To manage migrations you can use dotnet ef CLI tools or Package Manager Console.
# Add migration
dotnet ef migrations add MyMigration --project Data --startup-project Data
# Remove last migration
dotnet ef migrations remove --project Data --startup-project Data
# Apply migrations (specify environment)
dotnet ef database update --project Data --startup-project Data -- --environment Development
# Or apply migrations using Package Manager Console
Update-Database -Project Data -StartupProject Data -Args '--environment Development'EF CLI options:
--project- where migrations are stored (DbContext project).--startup-project- which project EF runs to build the model (usually the executable app).
- Create audits
- Browse audits
- Login
- Audit actions
- Registration
- Action comments
- Image upload
Distributed under the MIT License. See LICENSE.txt for more information.
Resources I find helpful and would like to give credit to:
- Dockx, K. (2019). Building a RESTful API with ASP.NET Core 3. Pluralsight. - Course • GitHub
- Dockx, K. (2020). Implementing Advanced RESTful Concerns with ASP.NET Core 3. Pluralsight. - Course • GitHub
- Resca, S. (2019). Hands-On RESTful Web Services with ASP.NET Core 3. Packt Publishing. - Book • GitHub
- Rippon, C. (2019). ASP.NET Core 3 and React. Packt Publishing. - Book • GitHub
- Cummings, N. (2019). Complete guide to building an app with .Net Core and React. Udemy. - Course • GitHub
- Code Maze (2023). Ultimate ASP.NET Core Web API. - Book