1.6 KiB
1.6 KiB
Valetax Test Application
This is an ASP.NET Core 10 application with REST API that implements the requirements from the ValetaxTest.pdf document.
Features Implemented
-
Tree Node Management
- Create independent trees with nodes
- Each node belongs to a single tree
- Child nodes belong to the same tree as their parent
- Unique node names within the same parent
- Delete nodes with all their descendants
- Rename nodes
-
Exception Journal
- Track all exceptions during REST API request processing
- Store unique Event ID, Timestamp, query/body parameters, and stack trace
- Custom SecureException handling
-
API Endpoints
- Journal API: getRange, getSingle
- Authentication API: rememberMe (simplified implementation)
- Tree API: get
- Node API: create, delete, rename
Database Setup
The application uses PostgreSQL as the database. To set up the database:
- Make sure you have PostgreSQL installed and running
- Create a database named "valetax"
- Update the connection string in appsettings.json if needed
Running Migrations
To create and run the database migration, execute the following commands:
dotnet ef migrations add InitialCreate
dotnet ef database update
Running the Application
To run the application:
dotnet run
The API will be available at https://localhost:7153 or http://localhost:5090.
API Documentation
The API follows the Swagger specification provided in the requirements. You can access the OpenAPI documentation at /openapi/v1.json when running in development mode.