Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 84 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,84 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
tags:
- v*
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
publish:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a single command using the runners shell
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build And Push Influunt
uses: docker/build-push-action@v1.1.0
with:
repository: eluki/influunt
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
target: influunt
tag_with_ref: true
push: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') }}
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
tags:
- v*
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
publish-webhost:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: eluki/influunt
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=main,enable={{is_default_branch}}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Influunt Host
uses: docker/build-push-action@v6
with:
context: .
target: influunt
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
publish-worker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: eluki/influunt-worker
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=main,enable={{is_default_branch}}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Influunt Worker
uses: docker/build-push-action@v6
with:
context: .
target: influunt
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@
"sourceFileMap": {
"/Views": "${workspaceFolder}/src/Influunt.Host/Views"
}
},
{
"name": "Influunt.Worker",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-Influunt.Worker",
"program": "${workspaceFolder}/src/Influunt.Worker/bin/Debug/net8/Influunt.Worker.dll",
"args": [],
"env": {
"DOTNET_ENVIRONMENT": "Development"
},
"cwd": "${workspaceFolder}/src/Influunt.Worker",
"stopAtEntry": false,
"console": "internalConsole"
}
]
}
44 changes: 28 additions & 16 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build-Influunt.Host",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/Influunt.Host/Influunt.Host.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
{
"version": "2.0.0",
"tasks": [
{
"label": "build-Influunt.Host",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/Influunt.Host/Influunt.Host.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "build-Influunt.Worker",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/Influunt.Worker/Influunt.Worker.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
62 changes: 62 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Influunt Developer Guide

## Project Overview
Influunt is a .NET 8 + Vue.js RSS aggregator with MongoDB storage and Redis caching.

## Key Technologies
- Backend: .NET 8, ASP.NET Core
- Frontend: Vue.js 2.x with Vue CLI 3
- Database: MongoDB
- Caching: Redis
- Authentication: Google OAuth2 and guest login

## Project Structure
```
src/
├── Influunt.Host/ # Main .NET backend with Vue frontend
│ ├── ClientApp/ # Vue.js frontend
│ └── appsettings.json # Configuration
└── Influunt.Feed/ # Feed processing logic
└── Influunt.Storage/ # Data access layer
```

## Development Commands
### Backend (.NET)
- Build: `dotnet build`
- Run: `dotnet run` (from src/Influunt.Host/)
- Test: `dotnet test` (from tests/ directory)

### Frontend (Vue.js)
- Install dependencies: `npm install` (in src/Influunt.Host/ClientApp/)
- Development server: `npm run serve`
- Production build: `npm run build`
- Lint: `npm run lint`

## Important Notes
1. **Environment Setup**:
- Requires .NET 8 SDK
- Requires Node.js 16+ (due to legacy provider flag in package.json)
- Requires MongoDB and Redis instances

2. **Configuration**:
- All settings in `appsettings.json` or environment variables
- Google Auth requires ClientId/ClientSecret
- Connection strings for MongoDB and Redis

3. **Build Process**:
- .NET builds automatically restore npm packages for the frontend
- Vue build requires `NODE_OPTIONS=--openssl-legacy-provider` environment variable

4. **Testing**:
- Tests are in the `tests/` directory
- Run with `dotnet test` from the test project directory

5. **Docker Deployment**:
- Use provided docker-compose or docker run commands in README
- Requires MongoDB and Redis connection strings
- Google Auth credentials for authentication

6. **Architecture**:
- Uses VueCliMiddleware for frontend integration
- Separated concerns: Host (web), Feed (processing), Storage (data)
- Background feed crawler enabled by default
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine/git as version

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / publish-webhost

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / publish-worker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
WORKDIR /src
COPY . /src
RUN echo $(git describe --tags --always 2>/dev/null | sed 's/-g[a-z0-9]\{7\}//') > /version ;\
Expand All @@ -17,14 +17,21 @@
dotnet restore -s https://api.nuget.org/v3/index.json &&\
dotnet build --no-restore -c Release &&\
dotnet publish ./src/Influunt.Host/Influunt.Host.csproj -c Release -o /app --no-build &&\
dotnet publish ./src/Influunt.Worker/Influunt.Worker.csproj -c Release -o /worker --no-build &&\
dotnet nuget locals http-cache --clear &&\
dotnet nuget locals temp --clear


######## Influunt Host
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim as influunt

Check warning on line 26 in Dockerfile

View workflow job for this annotation

GitHub Actions / publish-webhost

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 26 in Dockerfile

View workflow job for this annotation

GitHub Actions / publish-worker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
COPY --from=build /app /influunt
WORKDIR /influunt
EXPOSE 80
ENV ASPNETCORE_URLS=http://*:80
ENTRYPOINT ["dotnet", "Influunt.Host.dll"]

######## Influunt worker
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim as worker

Check warning on line 34 in Dockerfile

View workflow job for this annotation

GitHub Actions / publish-webhost

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 34 in Dockerfile

View workflow job for this annotation

GitHub Actions / publish-worker

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
COPY --from=build /worker /influunt
WORKDIR /influunt
ENTRYPOINT ["dotnet", "Influunt.Worker.dll"]
Loading
Loading