Skip to content

Commit

Permalink
move files over from monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
Guusvanmeerveld committed Apr 16, 2023
0 parents commit 8b1f745
Show file tree
Hide file tree
Showing 136 changed files with 14,516 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VITE_APP_NAME=Dust Mail
VITE_DEFAULT_SERVER=https://app.dust.email/api
VITE_REPO=Guusvanmeerveld/Dust-Mail
55 changes: 55 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"root": true,
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 8
},
"plugins": ["prettier"],
"ignorePatterns": ["node_modules/*", ".next/*", ".out/*", "isolation-dist/*"],
"extends": ["eslint:recommended"],
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"settings": {
"react": {
"version": "detect"
}
},
"env": {
"browser": true,
"node": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended"
],
"rules": {
"prettier/prettier": "error",
"react/prop-types": "off",
"no-sparse-arrays": "off",
"react/react-in-jsx-scope": "off",
"react-hooks/exhaustive-deps": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/no-autofocus": "off",
"no-mixed-spaces-and-tabs": "off",
"@typescript-eslint/no-unused-vars": ["warn"],
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
"allowExpressions": true,
"allowConciseArrowFunctionExpressionsStartingWithVoid": true,
"allowTypedFunctionExpressions": true
}
]
}
}
]
}
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

/dist
node_modules
target

dist-ssr
*.local

/stats.*

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
45 changes: 45 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"trailingComma": "none",
"useTabs": true,
"semi": true,
"printWidth": 80,
"arrowParens": "always",
"importOrderParserPlugins": [
"classProperties",
"decorators-legacy",
"typescript",
"jsx"
],
"importOrderSeparation": true,
"importOrder": [
"@rollup/.*",
"rollup-.*",
"^..?/.*",
"^slate.*",
"^react.*",
"^preact$",
"^preact.*",
"^axios.*",
"^redis.*",
"@redis/.*",
"@dust-mail/.*",
"^@nestjs/.*",
"^@emotion/.*",
"^@mui/material/.*",
"^@mui/.*",
"^@src/.*",
"^@models/.*",
"^@interfaces/.*",
"^@styles/.*",
"^@shared/.*",
"^@utils/.*",
"^@cache/.*",
"^@mail/.*",
"^@auth/.*",
"^@components/.*",
".*sass$",
".*css$",
"^@svg/.*"
],
"plugins": ["@trivago/prettier-plugin-sort-imports"]
}
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ARG BASE_IMAGE=node:16-alpine

# Builder
FROM $BASE_IMAGE as deployer

RUN apk add --no-cache curl git

RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm

WORKDIR /repo

COPY pnpm-lock.yaml ./

RUN pnpm fetch

COPY apps ./apps
COPY packages ./packages

COPY package.json pnpm-workspace.yaml .npmrc turbo.json ./

RUN pnpm install -r --offline --ignore-scripts

RUN pnpm run build --filter @dust-mail/web

RUN pnpm --filter @dust-mail/web --prod deploy /app

FROM nginx:alpine AS runner

COPY --from=deployer /app/dist /usr/share/nginx/html

EXPOSE 80
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @dust-mail/web

This the Dust mail web and desktop client. It's build using React and Material UI for the frontend and uses Vite as its main build tool. It uses Tauri to turn this exported static html into a multiplatform desktop app

For more information about setting up a client, contributing or implementing the client api, please check the [docs](https://docs.dust.email).
37 changes: 37 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dust Mail</title>
<meta name="description" content="A simple and fast mail client" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/src/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/src/favicon-16x16.png"
/>
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="theme-color" content="#ffffff" />
<base target="_parent" />
<style>
body {
background-color: #121212;
color: white;
}
</style>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.tsx"></script>
<noscript>Javascript is required to run this app</noscript>
</body>
</html>
84 changes: 84 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"name": "@dust-mail/web",
"displayName": "Dust Mail Client",
"description": "A simple and fast mail client",
"version": "0.2.4",
"repository": {
"url": "https://github.com/Guusvanmeerveld/Dust-Mail"
},
"homepage": "https://github.com/Guusvanmeerveld/Dust-Mail",
"author": {
"name": "Guus van Meerveld",
"url": "https://guusvanmeerveld.dev",
"email": "contact@guusvanmeerveld.dev"
},
"contributors": [],
"packageManager": "pnpm@7.5.2",
"size-limit": [
{
"path": "dist/assets/*.js",
"limit": "500 kB"
}
],
"license": "MIT",
"scripts": {
"dev": "vite",
"size": "size-limit",
"lint": "eslint src",
"build": "tsc && vite build",
"test": "vitest --passWithNoTests",
"coverage": "vitest run --coverage",
"preview": "vite preview",
"tauri": "tauri"
},
"dependencies": {
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@fontsource/roboto": "^4.5.7",
"@mui/icons-material": "^5.8.0",
"@mui/material": "^5.8.0",
"@mui/styled-engine": "^5.8.0",
"@tauri-apps/api": "^1.2.0",
"js-md5": "^0.7.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^8.0.3",
"react-query": "^3.39.1",
"react-router": "^6.3.0",
"react-router-dom": "^6.3.0",
"slate": "^0.81.1",
"slate-react": "^0.81.0",
"use-local-storage-state": "^17.2.0",
"zod": "^3.21.4",
"zustand": "^4.0.0-rc.1"
},
"devDependencies": {
"@babel/plugin-transform-react-jsx-source": "^7.18.6",
"@rollup/plugin-alias": "^3.1.9",
"@size-limit/preset-app": "^7.0.8",
"@tauri-apps/cli": "^1.0.4",
"@types/jest": "^28.1.4",
"@types/js-md5": "^0.7.0",
"@types/node": "^17.0.35",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"@vitejs/plugin-react": "^2.0.0",
"c8": "^7.12.0",
"eslint": "^8.20.0",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.7.1",
"rollup-plugin-visualizer": "^5.8.1",
"size-limit": "^7.0.8",
"typescript": "^4.5.4",
"vite": "^3.0.3",
"vite-plugin-pwa": "^0.12.2",
"vite-tsconfig-paths": "^3.4.1",
"vitest": "^0.20.3",
"workbox-window": "^6.5.3"
}
}
Loading

0 comments on commit 8b1f745

Please sign in to comment.