Skip to content

Commit 313fade

Browse files
authored
Merge pull request #41 from encryption4all/rm-frontend
Remove frontend, add dev API UI, and clean up project
2 parents 2ab46b4 + 5a2a556 commit 313fade

93 files changed

Lines changed: 55 additions & 69064 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/delivery.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ concurrency:
77
on:
88
push:
99
branches: [ main ]
10+
pull_request:
11+
branches: [ main ]
1012
release:
1113
# Note: a current limitation is that when a release is edited after publication, then the Docker tags are not automatically updated.
1214
types: [ published ]
@@ -27,18 +29,13 @@ jobs:
2729
strategy:
2830
fail-fast: false
2931
matrix:
30-
component: [backend, frontend]
32+
component: [backend]
3133
include:
3234
- component: backend
3335
dockerfile: backend.Dockerfile
3436
image_suffix: "-backend"
3537
local_tag: local/postguard-backend:scan
3638
sarif_category: backend
37-
- component: frontend
38-
dockerfile: frontend.Dockerfile
39-
image_suffix: "-frontend"
40-
local_tag: local/postguard-frontend:scan
41-
sarif_category: frontend
4239

4340
steps:
4441
- name: Checkout

api-description.yaml

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,31 @@ info:
33
title: "Cryptify API"
44
description: "This is the cryptify server that manages encrypted files."
55
version: "1.0.0"
6+
servers:
7+
- url: http://localhost:8000
8+
description: Development server
69
tags:
10+
- name: "Health"
11+
description: "Health check"
712
- name: "File upload"
813
description: "Upload files"
914
- name: "File download"
1015
description: "Download files"
1116
paths:
17+
/health:
18+
get:
19+
tags:
20+
- "Health"
21+
summary: "Health check endpoint"
22+
operationId: "health"
23+
responses:
24+
"200":
25+
description: "Service is healthy"
26+
content:
27+
text/plain:
28+
schema:
29+
type: "string"
30+
example: "OK"
1231
/fileupload/init:
1332
post:
1433
tags:
@@ -20,19 +39,30 @@ paths:
2039
application/json:
2140
schema:
2241
type: "object"
42+
required:
43+
- recipient
44+
- mailContent
45+
- mailLang
46+
- confirm
2347
properties:
24-
sender:
25-
type: "string"
26-
format: "email"
2748
recipient:
2849
type: "string"
2950
format: "email"
30-
fileSize:
31-
type: "number"
51+
example: "recipient@example.com"
52+
description: "Email address of the recipient"
3253
mailContent:
3354
type: "string"
55+
example: "Here is your encrypted file"
56+
description: "Content to include in the email"
3457
mailLang:
3558
type: "string"
59+
enum: ["EN", "NL"]
60+
example: "EN"
61+
description: "Email language (EN or NL)"
62+
confirm:
63+
type: "boolean"
64+
example: true
65+
description: "Whether to send a confirmation email to the sender"
3666
responses:
3767
"200":
3868
description: "Successful operation"
@@ -47,9 +77,10 @@ paths:
4777
schema:
4878
type: "object"
4979
properties:
50-
id:
80+
uuid:
5181
type: "string"
5282
format: "uuid"
83+
description: "Unique identifier for the file upload"
5384
/fileupload/{uuid}:
5485
put:
5586
tags:
@@ -121,13 +152,6 @@ paths:
121152
summary: "Finalize multipart file upload and send mail to recipient"
122153
operationId: "finalizeFileUpload"
123154
parameters:
124-
- in: "header"
125-
name: "cryptifytoken"
126-
description:
127-
"Identifies the version of the upload file parts. Part of the header from the last fileupload response."
128-
schema:
129-
type: "string"
130-
required: true
131155
- in: "header"
132156
name: "Content-Range"
133157
description:

backend.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.91.0-slim-trixie AS builder
1+
FROM rust:1.93.0-slim-trixie AS builder
22

33
ENV ROCKET_PROFILE=release
44

backend.dev.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.91.0-slim-trixie AS chef
1+
FROM rust:latest AS chef
22

33
# Install cargo-chef for dependency caching
44
RUN cargo install cargo-chef cargo-watch

conf/config.dev.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ smtp_port = 1025
99
# smtp_credentials = ["user", "pw"]
1010
allowed_origins = "^https?://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?$"
1111
pkg_url = "https://postguard-main.cs.ru.nl/pkg"
12+
# pkg_url = "https://postguard.staging.yivi.app"
13+
# pkg_url = "https://localhost:8087"

conf/crontab

Lines changed: 0 additions & 1 deletion
This file was deleted.

conf/cryptify.nl.conf

Lines changed: 0 additions & 75 deletions
This file was deleted.

conf/cryptify.service

Lines changed: 0 additions & 16 deletions
This file was deleted.

conf/irma.example.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

conf/nginx.conf

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)