diff --git a/package-lock.json b/package-lock.json index 0270f5d..0d7598f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "walias", + "name": "wildflock", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "walias", + "name": "wildflock", "version": "1.0.0", "dependencies": { "@faker-js/faker": "^8.0.2", @@ -939,11 +939,11 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -2026,9 +2026,9 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "funding": [ { "type": "individual", diff --git a/package.json b/package.json index dae9523..206bc96 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "walias", + "name": "wildflock", "description": "Aliases for Wild Duck", "version": "1.0.0", "homepage": "", @@ -7,9 +7,16 @@ "keywords": [ "feathers" ], - "author": { - "url": "github.com/msergo" - }, + "authors": [ + { + "name": "Sergii", + "url": "https://github.com/msergo" + }, + { + "name": "Erki", + "url": "https://github.com/veebkolm" + } + ], "contributors": [], "bugs": {}, "engines": { @@ -84,4 +91,4 @@ "lint-staged": { "*.{ts,js,css,md}": "prettier --write" } -} +} \ No newline at end of file diff --git a/public/screenshot.png b/public/screenshot.png new file mode 100644 index 0000000..cadc443 Binary files /dev/null and b/public/screenshot.png differ diff --git a/readme.md b/readme.md index 55fd6eb..c87b44d 100644 --- a/readme.md +++ b/readme.md @@ -1,19 +1,19 @@ -# walias +# Wildflock -> Manage email aliases for Wild Duck mail server +Headless service for managing address aliases in [Wild Duck](https://wildduck.email/) mail server. ## About -This project was build for [K-Space Hackathon2023](https://wiki.k-space.ee/en/hackathon/2023) +This project was build for [K-Space Hackathon2023](https://wiki.k-space.ee/en/hackathon/2023) ans is supposed to live in K-Space infra, however can be seamlessly deployed eslewhere. +The main motivation behind the development of this headless web UI was to provide users with a convenient tool for creating and deleting email aliases in the Wild Duck mail server. -## Features +The Wild Duck server has nice and functional [API](https://docs.wildduck.email/api/), but only offers an admin API token, limiting regular users' ability to manage their own email aliases. -- auth with oidc -- headless only, no DB -- develop/debug with skaffold on k8s cluster +User authentication is implemented via OIDC. -## TODO +No persistant storage, Redis is used for keeping express sessions. + +Deployed on k8s, developed with Skaffold. + +![Screenshot](./public/screenshot.png) -- remove TS-related hacks -- add tests -- make nicer UI diff --git a/src/logger.ts b/src/logger.ts index 99097e3..8e3799d 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -1,10 +1,7 @@ -// For more information about this file see https://dove.feathersjs.com/guides/cli/logging.html import { createLogger, format, transports } from 'winston'; -// Configure the Winston logger. For the complete documentation see https://github.com/winstonjs/winston export const logger = createLogger({ - // To see more detailed errors, change this to 'debug' level: 'info', - format: format.combine(format.splat(), format.simple()), + format: format.combine(format.splat(), format.json()), transports: [new transports.Console()], }); diff --git a/src/services/aliases/aliases.class.ts b/src/services/aliases/aliases.class.ts index 330f6ba..db77911 100644 --- a/src/services/aliases/aliases.class.ts +++ b/src/services/aliases/aliases.class.ts @@ -2,7 +2,7 @@ import type { NullableId, Params, ServiceInterface } from '@feathersjs/feathers' import type { Application } from '../../declarations'; import wildDuckClient from '../../clients/wildduck.client'; -import { faker, th } from '@faker-js/faker'; +import { faker } from '@faker-js/faker'; import { BadRequest } from '@feathersjs/errors'; import config from 'config';