+
+
+};
+
+export default UserManagement;
diff --git a/client/src/routes/MainRoutes.jsx b/client/src/routes/MainRoutes.jsx
index bc228cf..6b567bd 100644
--- a/client/src/routes/MainRoutes.jsx
+++ b/client/src/routes/MainRoutes.jsx
@@ -3,6 +3,7 @@ import { lazy } from 'react';
// project import
import Loadable from '../components/Loadable';
import MainLayout from '../layout/MainLayout';
+import UserManagement from '../pages/config/users/usermanagement';
// render - dashboard
const DashboardDefault = Loadable(lazy(() => import('../pages/dashboard')));
@@ -40,8 +41,8 @@ const MainRoutes = {
]
},
{
- path: 'sample-page',
- element:
+ path: 'config/users',
+ element:
},
{
path: 'shadow',
diff --git a/client/src/themes/index.jsx b/client/src/themes/index.jsx
index 4ef49ce..5266601 100644
--- a/client/src/themes/index.jsx
+++ b/client/src/themes/index.jsx
@@ -14,7 +14,9 @@ import componentsOverride from './overrides';
// ==============================|| DEFAULT THEME - MAIN ||============================== //
export default function ThemeCustomization({ children }) {
- const theme = Palette('light', 'default');
+ const theme = Palette(
+ window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ?
+ 'dark' : 'light');
// eslint-disable-next-line react-hooks/exhaustive-deps
const themeTypography = Typography(`'Public Sans', sans-serif`);
diff --git a/client/src/themes/palette.jsx b/client/src/themes/palette.jsx
index 7a1b2f3..7eafb5e 100644
--- a/client/src/themes/palette.jsx
+++ b/client/src/themes/palette.jsx
@@ -32,28 +32,48 @@ const Palette = (mode) => {
const paletteColor = ThemeOption(colors);
- return createTheme({
+ return createTheme(mode === 'dark' ? {
palette: {
mode,
common: {
- black: '#000',
- white: '#fff'
+ black: '#fff',
+ white: '#000'
},
...paletteColor,
text: {
- primary: paletteColor.grey[700],
- secondary: paletteColor.grey[500],
- disabled: paletteColor.grey[400]
+ primary: paletteColor.grey[0],
+ secondary: paletteColor.grey[200],
+ disabled: paletteColor.grey[300]
},
action: {
disabled: paletteColor.grey[300]
},
- divider: paletteColor.grey[200],
+ divider: paletteColor.grey[600],
background: {
- paper: paletteColor.grey[0],
- default: paletteColor.grey.A50
+ paper: paletteColor.grey[700],
+ default: paletteColor.grey[800]
}
}
+ } : {
+ mode,
+ common: {
+ black: '#000',
+ white: '#fff'
+ },
+ ...paletteColor,
+ text: {
+ primary: paletteColor.grey[700],
+ secondary: paletteColor.grey[500],
+ disabled: paletteColor.grey[400]
+ },
+ action: {
+ disabled: paletteColor.grey[300]
+ },
+ divider: paletteColor.grey[200],
+ background: {
+ paper: paletteColor.grey[0],
+ default: paletteColor.grey.A50
+ }
});
};
diff --git a/gupm.json b/gupm.json
index f2efa72..fa7fe07 100644
--- a/gupm.json
+++ b/gupm.json
@@ -33,6 +33,7 @@
"npm://@esbuild/linux-x64": "0.16.17",
"npm://@mui/lab": "^5.0.0-alpha.100",
"npm://@mui/material": "^5.10.6",
+ "npm://@mui/x-data-grid": "6.0.1",
"npm://@reduxjs/toolkit": "^1.8.5",
"npm://@testing-library/jest-dom": "^5.16.5",
"npm://@testing-library/react": "^13.4.0",
@@ -85,6 +86,6 @@
},
"description": "Cosmos Server",
"name": "cosmos-server",
- "version": "0.0.2",
+ "version": "0.0.3",
"wrapInstallFolder": "src"
}
\ No newline at end of file
diff --git a/readme.md b/readme.md
index a8c3652..55bbe10 100644
--- a/readme.md
+++ b/readme.md
@@ -5,14 +5,16 @@
# Cosmos Server
```
-Disclaimer: Cosmos is still in early Alpha stage, please be careful when you use it. It is not (yet, at least ;p) a replacement for proper control and mindfulness of your own security.
+**Disclaimer**: Cosmos is still in early Alpha stage, please be careful when you use it. It is not (yet, at least ;p) a replacement for proper control and mindfulness of your own security.
```
-Looking for a **secure** and **robust** way to run your **self-hosted applications**? With **Cosmos**, you can take control of your data and privacy without sacrificing security and stability.
+Looking for the right way to run your **self-hosted applications**? With **Cosmos**, you can take control of your data and privacy without sacrificing security and stability. **Safe** and **secure** platform by design, and most importantly, **easy to setup** without ambiguity. It is a combination of a **reverse proxy**, an **authentication provider** and an **application manager**.
+
+![screenshot1](./screenshot1.png)
Whether you have a **server**, a **NAS**, or a **Raspberry Pi** with applications such as **Plex**, **HomeAssistant** or even a blog, Cosmos is the perfect solution to secure it all. Simply install Cosmos on your server and connect to your applications through it to enjoy built-in security and robustness for all your services, right out of the box.
- * **Authentication** Connect to all your application with the same account, including strong security and multi-factor authentication
+ * **Authentication** Connect to all your application with the same account, including strong security and **multi-factor authentication**
* **Automatic HTTPS** certificates provision
* **Anti-bot** protections such as Captcha and IP rate limiting
* **Anti-DDOS** protections such as variable timeouts/throttling, IP rate limiting and IP blacklisting
diff --git a/screenshot1.png b/screenshot1.png
new file mode 100644
index 0000000..f1c9dcf
Binary files /dev/null and b/screenshot1.png differ
diff --git a/src/httpServer.go b/src/httpServer.go
index 734d774..8e11a82 100644
--- a/src/httpServer.go
+++ b/src/httpServer.go
@@ -172,8 +172,8 @@ func StartServer() {
// srapi.Use(utils.AcceptHeader("*/*"))
srapi.Use(utils.CORSHeader(utils.GetMainConfig().HTTPConfig.Hostname))
- srapi.Use(utils.MiddlewareTimeout(5 * time.Second))
- srapi.Use(httprate.Limit(20, 1*time.Minute,
+ srapi.Use(utils.MiddlewareTimeout(20 * time.Second))
+ srapi.Use(httprate.Limit(60, 1*time.Minute,
httprate.WithKeyFuncs(httprate.KeyByIP),
httprate.WithLimitHandler(func(w http.ResponseWriter, r *http.Request) {
utils.Error("Too many requests. Throttling", nil)