Rename: Open Archiver

This commit is contained in:
Wayne
2025-07-15 00:48:40 +03:00
parent 89ad7ca0d2
commit 9b25c8b9d3
44 changed files with 60 additions and 60 deletions

View File

@@ -21,7 +21,7 @@ STORAGE_TYPE=local
# --- Local Storage Settings ---
# The absolute path on the server where files will be stored.
# This is only used if STORAGE_TYPE is 'local'.
STORAGE_LOCAL_ROOT_PATH=/var/data/open-archive
STORAGE_LOCAL_ROOT_PATH=/var/data/open-archiver
# --- S3-Compatible Storage Settings ---
# These are only used if STORAGE_TYPE is 's3'.

View File

@@ -1,19 +1,19 @@
# Contributing to Open Archive
# Contributing to Open Archiver
First off, thank you for considering contributing to Open Archive! It's people like you that make open source such a great community. We welcome any and all contributions.
First off, thank you for considering contributing to Open Archiver! It's people like you that make open source such a great community. We welcome any and all contributions.
## Where do I start?
Not sure where to start? You can:
- Look through the [open issues](https://github.com/your-username/open-archive/issues) for bugs or feature requests.
- Look through the [open issues](https://github.com/LogicLabs-OU/OpenArchiver/issues) for bugs or feature requests.
- Check the issues labeled `good first issue` for tasks that are a good entry point into the codebase.
## How to Contribute
### Reporting Bugs
If you find a bug, please ensure the bug was not already reported by searching on GitHub under [Issues](https://github.com/your-username/open-archive/issues). If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
If you find a bug, please ensure the bug was not already reported by searching on GitHub under [Issues](https://github.com/LogicLabs-OU/OpenArchiver/issues). If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
### Suggesting Enhancements
@@ -31,7 +31,7 @@ If you have an idea for an enhancement, please open an issue to discuss it. This
## Code of Conduct
This project and everyone participating in it is governed by the [Open Archive Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior.
This project and everyone participating in it is governed by the [Open Archiver Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior.
## Styleguides

View File

@@ -1,7 +1,7 @@
# GNU Affero General Public License
_Version 3, 19 November 2007_
_Copyright © 2007 Free Software Foundation, Inc. &lt;<http://fsf.org/>&gt;_
_Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>_
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

View File

@@ -1,11 +1,11 @@
# Open Archive
# Open Archiver
> [!WARNING]
> This project is currently in active development and has not yet reached a stable General Availability (GA) release. It is not recommended for use in production environments. We welcome contributions from the community to help us accelerate development and improve the platform. Please see our [Contributing](#contributing) section for more details.
**A secure, sovereign, and affordable open-source platform for email archiving and eDiscovery.**
Open Archive enables individuals and organizations to take control of their digital communication history. It provides a robust, self-hosted solution for ingesting, storing, indexing, and searching emails from major platforms, ensuring a permanent, tamper-proof record of your most critical data, free from vendor lock-in.
Open Archiver enables individuals and organizations to take control of their digital communication history. It provides a robust, self-hosted solution for ingesting, storing, indexing, and searching emails from major platforms, ensuring a permanent, tamper-proof record of your most critical data, free from vendor lock-in.
## Vision
@@ -23,7 +23,7 @@ To provide individuals and organizations with a secure, sovereign, and affordabl
## Tech Stack
Open Archive is built on a modern, scalable, and maintainable technology stack:
Open Archiver is built on a modern, scalable, and maintainable technology stack:
- **Frontend**: SvelteKit with Svelte 5
- **Backend**: Node.js with Express.js & TypeScript
@@ -44,8 +44,8 @@ Open Archive is built on a modern, scalable, and maintainable technology stack:
1. **Clone the repository:**
```bash
git clone https://github.com/your-username/open-archive.git
cd open-archive
git clone https://github.com/LogicLabs-OU/OpenArchiver.git
cd open-archiver
```
2. **Configure your environment:**
@@ -66,7 +66,7 @@ Open Archive is built on a modern, scalable, and maintainable technology stack:
This command will build the necessary Docker images and start all the services (frontend, backend, database, etc.) in the background.
4. **Access the application:**
Once the services are running, you can access the Open Archive web interface by navigating to `http://localhost:3000` in your web browser.
Once the services are running, you can access the Open Archiver web interface by navigating to `http://localhost:3000` in your web browser.
## Contributing

View File

@@ -24,7 +24,7 @@ When `STORAGE_TYPE` is set to `local`, you must also provide the root path where
```env
# .env
STORAGE_TYPE=local
STORAGE_LOCAL_ROOT_PATH=/var/data/open-archive
STORAGE_LOCAL_ROOT_PATH=/var/data/open-archiver
```
- `STORAGE_LOCAL_ROOT_PATH`: The absolute path on the server where the archive will be created. The service will create subdirectories within this path as needed.

View File

@@ -1,10 +1,10 @@
{
"name": "open-archive",
"name": "open-archiver",
"private": true,
"scripts": {
"dev": "dotenv -- pnpm --filter \"./packages/*\" --parallel dev",
"build": "pnpm --filter \"./packages/*\" --parallel build",
"start:workers": "dotenv -- concurrently \"pnpm --filter @open-archive/backend start:ingestion-worker\" \"pnpm --filter @open-archive/backend start:indexing-worker\""
"start:workers": "dotenv -- concurrently \"pnpm --filter @open-archiver/backend start:ingestion-worker\" \"pnpm --filter @open-archiver/backend start:indexing-worker\""
},
"devDependencies": {
"concurrently": "^9.2.0",

View File

@@ -1,5 +1,5 @@
{
"name": "@open-archive/backend",
"name": "@open-archiver/backend",
"version": "0.1.0",
"private": true,
"main": "dist/index.js",
@@ -18,7 +18,7 @@
"@aws-sdk/client-s3": "^3.844.0",
"@aws-sdk/lib-storage": "^3.844.0",
"@azure/msal-node": "^3.6.3",
"@open-archive/types": "workspace:*",
"@open-archiver/types": "workspace:*",
"axios": "^1.10.0",
"bcryptjs": "^3.0.2",
"bullmq": "^5.56.3",

View File

@@ -1,6 +1,6 @@
import { Request, Response } from 'express';
import { IngestionService } from '../../services/IngestionService';
import { CreateIngestionSourceDto, UpdateIngestionSourceDto } from '@open-archive/types';
import { CreateIngestionSourceDto, UpdateIngestionSourceDto } from '@open-archiver/types';
export class IngestionController {
public create = async (req: Request, res: Response): Promise<Response> => {

View File

@@ -1,6 +1,6 @@
import { Request, Response } from 'express';
import { SearchService } from '../../services/SearchService';
import type { SearchQuery } from '@open-archive/types';
import type { SearchQuery } from '@open-archiver/types';
export class SearchController {
private searchService: SearchService;

View File

@@ -1,6 +1,6 @@
import type { Request, Response, NextFunction } from 'express';
import type { IAuthService } from '../../services/AuthService';
import type { AuthTokenPayload } from '@open-archive/types';
import type { AuthTokenPayload } from '@open-archiver/types';
import 'dotenv/config';
// By using module augmentation, we can add our custom 'user' property
// to the Express Request interface in a type-safe way.

View File

@@ -1,4 +1,4 @@
import { StorageConfig } from '@open-archive/types';
import { StorageConfig } from '@open-archiver/types';
import 'dotenv/config';
const storageType = process.env.STORAGE_TYPE;

View File

@@ -1,6 +1,6 @@
import { Job } from 'bullmq';
import { IngestionService } from '../../services/IngestionService';
import { IInitialImportJob } from '@open-archive/types';
import { IInitialImportJob } from '@open-archiver/types';
const ingestionService = new IngestionService();

View File

@@ -1,6 +1,6 @@
import { Job } from 'bullmq';
import { IngestionService } from '../../services/IngestionService';
import { IInitialImportJob } from '@open-archive/types';
import { IInitialImportJob } from '@open-archiver/types';
const ingestionService = new IngestionService();

View File

@@ -1,7 +1,7 @@
import { count, desc, eq } from 'drizzle-orm';
import { db } from '../database';
import { archivedEmails, attachments, emailAttachments } from '../database/schema';
import type { PaginatedArchivedEmails, ArchivedEmail, Recipient } from '@open-archive/types';
import type { PaginatedArchivedEmails, ArchivedEmail, Recipient } from '@open-archiver/types';
import { StorageService } from './StorageService';
import type { Readable } from 'stream';

View File

@@ -1,6 +1,6 @@
import { compare, hash } from 'bcryptjs';
import type { SignJWT, jwtVerify } from 'jose';
import type { AuthTokenPayload, User, LoginResponse } from '@open-archive/types';
import type { AuthTokenPayload, User, LoginResponse } from '@open-archiver/types';
// This interface defines the contract for a service that manages users.
// The AuthService will depend on this abstraction, not a concrete implementation.

View File

@@ -4,7 +4,7 @@ import type {
Microsoft365Credentials,
GenericImapCredentials,
EmailObject
} from '@open-archive/types';
} from '@open-archiver/types';
import { GoogleConnector } from './ingestion-connectors/GoogleConnector';
import { MicrosoftConnector } from './ingestion-connectors/MicrosoftConnector';
import { ImapConnector } from './ingestion-connectors/ImapConnector';

View File

@@ -1,4 +1,4 @@
import { Attachment, EmailDocument } from '@open-archive/types';
import { Attachment, EmailDocument } from '@open-archiver/types';
import { SearchService } from './SearchService';
import { StorageService } from './StorageService';
import { extractText } from '../helpers/textExtractor';

View File

@@ -5,13 +5,13 @@ import type {
UpdateIngestionSourceDto,
IngestionSource,
IngestionCredentials
} from '@open-archive/types';
} from '@open-archiver/types';
import { eq } from 'drizzle-orm';
import { CryptoService } from './CryptoService';
import { EmailProviderFactory } from './EmailProviderFactory';
import { ingestionQueue, indexingQueue } from '../jobs/queues';
import { StorageService } from './StorageService';
import type { IInitialImportJob, EmailObject } from '@open-archive/types';
import type { IInitialImportJob, EmailObject } from '@open-archiver/types';
import { archivedEmails, attachments as attachmentsSchema, emailAttachments } from '../database/schema';
import { createHash } from 'crypto';
import { logger } from '../config/logger';

View File

@@ -1,6 +1,6 @@
import { Index, MeiliSearch, SearchParams } from 'meilisearch';
import { config } from '../config';
import type { SearchQuery, SearchResult, EmailDocument } from '@open-archive/types';
import type { SearchQuery, SearchResult, EmailDocument } from '@open-archiver/types';
export class SearchService {
private client: MeiliSearch;

View File

@@ -1,4 +1,4 @@
import { IStorageProvider, StorageConfig } from '@open-archive/types';
import { IStorageProvider, StorageConfig } from '@open-archiver/types';
import { LocalFileSystemProvider } from './storage/LocalFileSystemProvider';
import { S3StorageProvider } from './storage/S3StorageProvider';
import { config } from '../config/index';

View File

@@ -1,5 +1,5 @@
import { hash } from 'bcryptjs';
import type { User } from '@open-archive/types';
import type { User } from '@open-archiver/types';
import type { IUserService } from './AuthService';
// This is a mock implementation of the IUserService.

View File

@@ -1,4 +1,4 @@
import type { GoogleWorkspaceCredentials, EmailObject, EmailAddress } from '@open-archive/types';
import type { GoogleWorkspaceCredentials, EmailObject, EmailAddress } from '@open-archiver/types';
import type { IEmailConnector } from '../EmailProviderFactory';
import { google } from 'googleapis';
import { simpleParser, ParsedMail, Attachment, AddressObject } from 'mailparser';

View File

@@ -1,4 +1,4 @@
import type { GenericImapCredentials, EmailObject, EmailAddress } from '@open-archive/types';
import type { GenericImapCredentials, EmailObject, EmailAddress } from '@open-archiver/types';
import type { IEmailConnector } from '../EmailProviderFactory';
import { ImapFlow } from 'imapflow';
import { simpleParser, ParsedMail, Attachment, AddressObject } from 'mailparser';

View File

@@ -1,4 +1,4 @@
import type { Microsoft365Credentials, EmailObject, EmailAddress } from '@open-archive/types';
import type { Microsoft365Credentials, EmailObject, EmailAddress } from '@open-archiver/types';
import type { IEmailConnector } from '../EmailProviderFactory';
import { ConfidentialClientApplication } from '@azure/msal-node';
import { simpleParser, ParsedMail, Attachment, AddressObject } from 'mailparser';

View File

@@ -1,4 +1,4 @@
import { IStorageProvider, LocalStorageConfig } from '@open-archive/types';
import { IStorageProvider, LocalStorageConfig } from '@open-archiver/types';
import { promises as fs } from 'fs';
import * as path from 'path';
import { createReadStream, createWriteStream } from 'fs';

View File

@@ -1,4 +1,4 @@
import { IStorageProvider, S3StorageConfig } from '@open-archive/types';
import { IStorageProvider, S3StorageConfig } from '@open-archiver/types';
import {
S3Client,
GetObjectCommand,

File diff suppressed because one or more lines are too long

View File

@@ -14,7 +14,7 @@
"lint": "prettier --check ."
},
"dependencies": {
"@open-archive/types": "workspace:*",
"@open-archiver/types": "workspace:*",
"jose": "^6.0.1",
"lucide-svelte": "^0.525.0",
"postal-mime": "^2.4.4",

View File

@@ -1,4 +1,4 @@
import type { User } from '@open-archive/types';
import type { User } from '@open-archiver/types';
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces

View File

@@ -1,6 +1,6 @@
import type { Handle } from '@sveltejs/kit';
import { jwtVerify } from 'jose';
import type { User } from '@open-archive/types';
import type { User } from '@open-archiver/types';
const JWT_SECRET = new TextEncoder().encode('a-very-secret-key');

View File

@@ -1,5 +1,5 @@
import { authStore } from '$lib/stores/auth.store';
import type { User } from '@open-archive/types';
import type { User } from '@open-archiver/types';
import { get } from 'svelte/store';
const BASE_URL = '/api/v1'; // Using a relative URL for proxying

View File

@@ -4,7 +4,7 @@
>
<div class="flex flex-col items-center gap-2">
<p class="text-muted-foreground text-balance text-center text-sm leading-loose">
© {new Date().getFullYear()} OpenArchive. All rights reserved.
© {new Date().getFullYear()} Open Archiver. All rights reserved.
</p>
</div>
</div>

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import type { IngestionSource, CreateIngestionSourceDto } from '@open-archive/types';
import type { IngestionSource, CreateIngestionSourceDto } from '@open-archiver/types';
import { Button } from '$lib/components/ui/button';
import * as Dialog from '$lib/components/ui/dialog';
import { Input } from '$lib/components/ui/input';

View File

@@ -1,6 +1,6 @@
import { writable } from 'svelte/store';
import { browser } from '$app/environment';
import type { User } from '@open-archive/types';
import type { User } from '@open-archiver/types';
interface AuthState {
accessToken: string | null;

View File

@@ -21,8 +21,8 @@
<header class="bg-background sticky top-0 z-40 border-b">
<div class="container mx-auto flex h-16 flex-row items-center justify-between">
<a href="/dashboard" class="text-primary flex flex-row items-center gap-2 font-bold">
<img src="/logos/logo-sq.svg" alt="OpenArchive Logo" class="h-8 w-8" />
<span>OpenArchive</span>
<img src="/logos/logo-sq.svg" alt="OpenArchiver Logo" class="h-8 w-8" />
<span>Open Archiver</span>
</a>
<NavigationMenu.Root>
<NavigationMenu.List class="flex items-center space-x-4">

View File

@@ -3,7 +3,7 @@
</script>
<svelte:head>
<title>Dashboard - OpenArchive</title>
<title>Dashboard - Open Archiver</title>
</svelte:head>
<div class="">

View File

@@ -1,6 +1,6 @@
import { api } from '$lib/server/api';
import type { PageServerLoad } from './$types';
import type { IngestionSource, PaginatedArchivedEmails } from '@open-archive/types';
import type { IngestionSource, PaginatedArchivedEmails } from '@open-archiver/types';
export const load: PageServerLoad = async (event) => {
try {

View File

@@ -1,6 +1,6 @@
import { api } from '$lib/server/api';
import type { PageServerLoad } from './$types';
import type { ArchivedEmail } from '@open-archive/types';
import type { ArchivedEmail } from '@open-archiver/types';
export const load: PageServerLoad = async (event) => {
try {

View File

@@ -1,6 +1,6 @@
import { api } from '$lib/server/api';
import type { PageServerLoad } from './$types';
import type { IngestionSource } from '@open-archive/types';
import type { IngestionSource } from '@open-archiver/types';
export const load: PageServerLoad = async (event) => {
try {

View File

@@ -7,7 +7,7 @@
import * as Dialog from '$lib/components/ui/dialog';
import IngestionSourceForm from '$lib/components/custom/IngestionSourceForm.svelte';
import { api } from '$lib/api.client';
import type { IngestionSource, CreateIngestionSourceDto } from '@open-archive/types';
import type { IngestionSource, CreateIngestionSourceDto } from '@open-archiver/types';
let { data }: { data: PageData } = $props();

View File

@@ -1,6 +1,6 @@
import type { PageServerLoad, Actions } from './$types';
import { api } from '$lib/server/api';
import type { SearchResult } from '@open-archive/types';
import type { SearchResult } from '@open-archiver/types';
export const load: PageServerLoad = async () => {
return {

View File

@@ -54,7 +54,7 @@
function getSnippets(
text: string,
positions: { start: number; length: number }[],
contextLength = 15
contextLength = 50
) {
if (!text || !positions) {
return [];
@@ -99,7 +99,7 @@
</script>
<svelte:head>
<title>Search | OpenArchive</title>
<title>Search | Open Archiver</title>
<meta name="description" content="Search for archived emails." />
</svelte:head>

View File

@@ -6,7 +6,7 @@
import { Label } from '$lib/components/ui/label';
import { api } from '$lib/api.client';
import { authStore } from '$lib/stores/auth.store';
import type { LoginResponse } from '@open-archive/types';
import type { LoginResponse } from '@open-archiver/types';
let email = '';
let password = '';
@@ -39,8 +39,8 @@
</script>
<svelte:head>
<title>Login - OpenArchive</title>
<meta name="description" content="Login to your OpenArchive account." />
<title>Login - Open Archiver</title>
<meta name="description" content="Login to your Open Archiver account." />
</svelte:head>
<div class="flex min-h-screen items-center justify-center bg-gray-100 dark:bg-gray-900">

View File

@@ -1,5 +1,5 @@
{
"name": "@open-archive/types",
"name": "@open-archiver/types",
"version": "0.1.0",
"private": true,
"main": "dist/index.js",