Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
extension:
name: Extension (lint and build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run build

api:
name: API (build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
- run: dotnet build backend/DevTaskManager.csproj --configuration Release
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ obj/
*.sln
*.sw?
.env

# Saídas de build geradas
backend/config/
*.tsbuildinfo
vite.config.ts.timestamp-*
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Yago Borba

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@

<div align="center">

[![CI Status][ci-shield]][ci-link]
[![Project Type][type-shield]][type-link]
[![.NET][dotnet-shield]][dotnet-link]
[![Vite][vite-shield]][vite-link]

</div>

[ci-shield]: https://github.com/YagoBorba/DevTaskManager/actions/workflows/ci.yml/badge.svg?branch=main
[ci-link]: https://github.com/YagoBorba/DevTaskManager/actions/workflows/ci.yml
[type-shield]: https://img.shields.io/badge/Project-Chrome%20Extension%20%2B%20API-0A66C2?style=flat-square&labelColor=black
[type-link]: https://github.com/YagoBorba/DevTaskManager
[dotnet-shield]: https://img.shields.io/badge/.NET-8.0-512BD4?style=flat-square&logo=dotnet&labelColor=black
Expand Down Expand Up @@ -90,7 +93,9 @@ npm install
dotnet restore backend/DevTaskManager.csproj
```

### 4. Apply database migrations
### 4. Apply database migrations (optional)

The API applies pending migrations on startup and creates `devtaskmanager.db` in the working directory. To apply them manually:

```bash
dotnet ef database update --project backend/DevTaskManager.csproj
Expand Down Expand Up @@ -184,7 +189,7 @@ Contributions are welcome.

## 📝 License

No `LICENSE` file is currently present in this repository. If you want, you can add one (for example, MIT) to define usage terms explicitly.
Distributed under the [MIT License](LICENSE).

## 📬 Contact

Expand Down
6 changes: 6 additions & 0 deletions backend/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@

var app = builder.Build();

// Creates or updates the SQLite database on startup, so a fresh clone runs without a manual migration step.
using (var scope = app.Services.CreateScope())
{
scope.ServiceProvider.GetRequiredService<AppDbContext>().Database.Migrate();
}


if (app.Environment.IsDevelopment())
{
Expand Down
2 changes: 1 addition & 1 deletion backend/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"DefaultConnection": "Data Source=/home/yagoaborba/DevTaskManager/backend/devtaskmanager.db"
"DefaultConnection": "Data Source=devtaskmanager.db"
},
"Logging": {
"LogLevel": {
Expand Down
Binary file removed backend/bin/Debug/net8.0/Azure.Core.dll
Binary file not shown.
Binary file removed backend/bin/Debug/net8.0/Azure.Identity.dll
Binary file not shown.
Binary file removed backend/bin/Debug/net8.0/DevTaskManager
Binary file not shown.
Loading
Loading