initial commit
This commit is contained in:
commit
f65a7b5656
|
|
@ -0,0 +1,50 @@
|
|||
# Environment variables
|
||||
.env
|
||||
|
||||
# Docker
|
||||
docker-compose.override.yml
|
||||
|
||||
# Backend
|
||||
backend/bin/
|
||||
backend/obj/
|
||||
backend/*.db
|
||||
backend/*.db-shm
|
||||
backend/*.db-wal
|
||||
backend/.vs/
|
||||
backend/.vscode/
|
||||
backend/*.user
|
||||
backend/*.suo
|
||||
|
||||
# Frontend
|
||||
frontend/node_modules/
|
||||
frontend/dist/
|
||||
frontend/.vscode/
|
||||
frontend/.idea/
|
||||
|
||||
# IDEs
|
||||
.vs/
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
.DS_Store
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# OS
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
Desktop.ini
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Build artifacts
|
||||
*.dll
|
||||
*.exe
|
||||
*.pdb
|
||||
*.cache
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
= dalex-todo-proto
|
||||
:toc: left
|
||||
:toclevels: 3
|
||||
|
||||
== Overview
|
||||
|
||||
A prototype for the dalex-todo application.
|
||||
|
||||
Vue3 frontend with Tailwind CSS and TypeScript.
|
||||
|
||||
ASP.NET Core Minimal APIs .net 10 backend with SQLite database.
|
||||
|
||||
Keycloak authentication.
|
||||
|
||||
Keycloak server is https://terminus.bluelake.cloud/
|
||||
|
||||
The keycloak realm is "dalex-immo-dev" and the client id is "dalex-proto".
|
||||
|
||||
frontend and backend and the db are dockerized.
|
||||
|
||||
frontend shall run an port 3030, backend shall run on port 5050.
|
||||
|
||||
each user shall have its own todos.
|
||||
|
||||
user must be able to see the list of todos, be able to add new todos, be able to edit and delete todos. user must be able to mark todos as completed. each todo has a created and done timestamp.
|
||||
|
||||
todos that are old but not done shall be listed on top. done todos shall be listed at the bottom.
|
||||
todos that were done last week or older shall be not appear on the first page, but shall be accessible via a button "show older todos".
|
||||
|
||||
every single page must be protected by Keycloak authentication.
|
||||
|
||||
when done, run the docker compose up and check if the application is running.
|
||||
|
||||
== Deployment
|
||||
|
||||
The dockers must be deployed to gitea server to https://brokkr.robotico.dev/dalex/-/packages via python script.
|
||||
|
||||
== Development
|
||||
|
||||
We expect a .env file to be present in the root directory. It contains PUBLISH_TOKEN with access to the gitea server. The .env file must never be overwritten.
|
||||
a .gitignore must be created and include relevant filters for this project.
|
||||
Readme.md must contain techstack on top.
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
# Dalex Todo Prototype
|
||||
|
||||
A full-stack todo application with Vue3 frontend and ASP.NET Core backend, secured with Keycloak authentication.
|
||||
|
||||
## Features
|
||||
|
||||
- **Frontend**: Vue3 with TypeScript and Tailwind CSS
|
||||
- **Backend**: ASP.NET Core 9.0 Minimal APIs with SQLite
|
||||
- **Authentication**: Keycloak integration
|
||||
- **Containerization**: Docker and Docker Compose
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Docker and Docker Compose
|
||||
- Keycloak server (configured at https://terminus.bluelake.cloud/)
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Running with Docker Compose
|
||||
|
||||
1. Clone the repository
|
||||
2. Run the application:
|
||||
|
||||
```bash
|
||||
docker-compose up --build
|
||||
```
|
||||
|
||||
3. Access the application:
|
||||
- Frontend: http://localhost:3030
|
||||
- Backend API: http://localhost:5050
|
||||
|
||||
### Development Mode
|
||||
|
||||
#### Backend
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
dotnet restore
|
||||
dotnet run
|
||||
```
|
||||
|
||||
#### Frontend
|
||||
|
||||
```bash
|
||||
cd frontend
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
### Backend (ASP.NET Core)
|
||||
|
||||
- Minimal APIs architecture
|
||||
- SQLite database for data persistence
|
||||
- JWT authentication via Keycloak
|
||||
- RESTful API endpoints for CRUD operations
|
||||
|
||||
### Frontend (Vue3)
|
||||
|
||||
- TypeScript for type safety
|
||||
- Tailwind CSS for styling
|
||||
- Keycloak-js for authentication
|
||||
- Axios for API calls
|
||||
|
||||
## API Endpoints
|
||||
|
||||
- `GET /api/todos/recent` - Get recent todos (excludes completed todos older than 1 week)
|
||||
- `GET /api/todos` - Get all todos
|
||||
- `POST /api/todos` - Create a new todo
|
||||
- `PUT /api/todos/{id}` - Update a todo
|
||||
- `DELETE /api/todos/{id}` - Delete a todo
|
||||
|
||||
All endpoints require authentication.
|
||||
|
||||
## Todo Features
|
||||
|
||||
- Add, edit, and delete todos
|
||||
- Mark todos as completed with timestamps
|
||||
- Sort todos: incomplete (older first) at top, completed at bottom
|
||||
- Filter: Hide completed todos older than 1 week (show via button)
|
||||
- Each user has their own todos (multi-tenant)
|
||||
|
||||
## Configuration
|
||||
|
||||
### Keycloak
|
||||
|
||||
The application is configured to use Keycloak at `https://terminus.bluelake.cloud/` with:
|
||||
- Realm: `dalex-immo-dev`
|
||||
- Client ID: `dalex-proto`
|
||||
|
||||
### Ports
|
||||
|
||||
- Frontend: 3030
|
||||
- Backend: 5050
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
## Deployment
|
||||
|
||||
For deploying Docker images to the Gitea package registry at https://brokkr.robotico.dev/dalex/-/packages, see [DEPLOYMENT.md](DEPLOYMENT.md).
|
||||
|
||||
## Development
|
||||
|
||||
Before deployment, create a `.env` file in the project root:
|
||||
|
||||
```bash
|
||||
PUBLISH_TOKEN=your_gitea_token_here
|
||||
```
|
||||
|
||||
See `.env.example` for template. The `.env` file is git-ignored and will never be overwritten.
|
||||
Loading…
Reference in New Issue