changes
This commit is contained in:
55
README.md
Normal file
55
README.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# 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
|
||||
|
||||
1. **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
|
||||
|
||||
2. **Exception Journal**
|
||||
- Track all exceptions during REST API request processing
|
||||
- Store unique Event ID, Timestamp, query/body parameters, and stack trace
|
||||
- Custom SecureException handling
|
||||
|
||||
3. **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:
|
||||
|
||||
1. Make sure you have PostgreSQL installed and running
|
||||
2. Create a database named "valetax"
|
||||
3. Update the connection string in appsettings.json if needed
|
||||
|
||||
## Running Migrations
|
||||
|
||||
To create and run the database migration, execute the following commands:
|
||||
|
||||
```bash
|
||||
dotnet ef migrations add InitialCreate
|
||||
dotnet ef database update
|
||||
```
|
||||
|
||||
## Running the Application
|
||||
|
||||
To run the application:
|
||||
|
||||
```bash
|
||||
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.
|
||||
Reference in New Issue
Block a user