feat(infra): Docker-compose configuration and environment-specific security guards for Beta deployment to Test environment (#56)
This pull request introduces the dedicated containerized infrastructure and configuration for deploying NexusReader's beta version in the Test environment. ### Summary of Changes 1. **Docker Infrastructure & Secrets**: - **`docker-compose.test.yml`**: Configured dedicated database and auxiliary services (PostgreSQL 17, Qdrant, Neo4j) on isolated, non-standard ports to ensure zero conflict with the existing server configurations. - **`.env.test.template`**: Provided an environment variable template showing required setups, including mandatory database passwords, API keys, and admin custom passwords. - **`.gitignore`**: Excluded local `.env` files to prevent accidental commits of production or staging secrets. 2. **Database Hardening**: - Configured Neo4j with basic authentication (`IDriver` instantiation uses basic auth when credentials are provided in configuration). - Configured PostgreSQL to use mandatory authentication. - Configured the admin seeder (`DbInitializer.cs`) to dynamically use `NEXUS_ADMIN_PASSWORD` from environment variables, falling back to a default password in local Development only. 3. **Feature-Flagged Restrictions**: - **`appsettings.Test.json`**: Implemented `Features:AllowRegistration` and `Features:AllowPasswordReset` flags set to `false`. - **Middleware Enforcement (`Program.cs`)**: Intercepts requests to `/identity/register` and `/identity/forgotPassword` (and their MVC/form variations) and rejects them with a `403 Forbidden` response in restricted environments. - **OAuth Provisioning Guard (`Program.cs`)**: Blocks new account provisioning via Google OAuth callback by checking the `Features:AllowRegistration` configuration, redirecting users to the login page with a descriptive error. - **UI Protection (`Login.razor`, `Register.razor`)**: Conditionally hides registration/password reset links and intercepts manual navigation attempts to `/account/register` by redirecting to login with a warning. --------- Co-authored-by: Marek Jasiński <jasins.marek@gmail.com> Reviewed-on: #56 Co-authored-by: Antigravity <antigravity@google.com> Co-committed-by: Antigravity <antigravity@google.com>
This commit was merged in pull request #56.
This commit is contained in:
@@ -0,0 +1,362 @@
|
||||
.nexus-unified-mobile-toolbar {
|
||||
position: fixed;
|
||||
bottom: 16px;
|
||||
left: 16px;
|
||||
right: 16px;
|
||||
height: 64px;
|
||||
background: rgba(18, 18, 18, 0.75);
|
||||
backdrop-filter: blur(24px);
|
||||
-webkit-backdrop-filter: blur(24px);
|
||||
border: 1px solid rgba(0, 255, 153, 0.2);
|
||||
border-radius: 16px;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto 1fr;
|
||||
align-items: center;
|
||||
padding: 0 1rem;
|
||||
z-index: 1000;
|
||||
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
|
||||
box-sizing: border-box;
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
||||
}
|
||||
|
||||
.toolbar-slot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* LEFT SLOT: Progress circular ring */
|
||||
.left-slot {
|
||||
justify-content: flex-start;
|
||||
gap: 0.65rem;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.progress-ring-wrapper {
|
||||
position: relative;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.progress-ring {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.progress-ring-indicator {
|
||||
transition: stroke-dashoffset 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.progress-text {
|
||||
position: absolute;
|
||||
font-size: 0.65rem;
|
||||
font-weight: 700;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.progress-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.slot-label {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.slot-desc {
|
||||
font-size: 0.6rem;
|
||||
color: rgba(255,255,255,0.4);
|
||||
}
|
||||
|
||||
/* CENTER SLOT: Glowing AI Core Button */
|
||||
.center-slot {
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.btn-nexus-ai-core {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(135deg, #00FF99 0%, #00F0FF 100%);
|
||||
border: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #0B0C10;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
z-index: 5;
|
||||
box-shadow: 0 0 20px rgba(0, 255, 153, 0.4);
|
||||
transform: translateY(-8px);
|
||||
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
.btn-nexus-ai-core:active {
|
||||
transform: translateY(-6px) scale(0.95);
|
||||
box-shadow: 0 0 10px rgba(0, 255, 153, 0.3);
|
||||
}
|
||||
|
||||
.ai-core-icon {
|
||||
color: #0b0c10;
|
||||
filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
|
||||
}
|
||||
|
||||
/* Pulse effects */
|
||||
.pulse-ring {
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
left: -4px;
|
||||
right: -4px;
|
||||
bottom: -4px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid rgba(0, 255, 153, 0.4);
|
||||
opacity: 0;
|
||||
animation: corePulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.pulse-ring-outer {
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
left: -8px;
|
||||
right: -8px;
|
||||
bottom: -8px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid rgba(0, 240, 255, 0.2);
|
||||
opacity: 0;
|
||||
animation: corePulseOuter 2.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@keyframes corePulse {
|
||||
0% { transform: scale(0.95); opacity: 0; }
|
||||
50% { opacity: 0.8; }
|
||||
100% { transform: scale(1.15); opacity: 0; }
|
||||
}
|
||||
|
||||
@keyframes corePulseOuter {
|
||||
0% { transform: scale(0.9); opacity: 0; }
|
||||
50% { opacity: 0.5; }
|
||||
100% { transform: scale(1.25); opacity: 0; }
|
||||
}
|
||||
|
||||
/* RIGHT SLOT: Layout Switching */
|
||||
.right-slot {
|
||||
justify-content: flex-end;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
|
||||
.nav-toggle-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
padding: 6px 8px;
|
||||
border-radius: 8px;
|
||||
color: rgba(255, 255, 255, 0.45);
|
||||
cursor: pointer;
|
||||
transition: all 0.25s ease;
|
||||
}
|
||||
|
||||
.nav-toggle-btn.active {
|
||||
color: var(--nexus-neon, #00FF99);
|
||||
background-color: rgba(0, 255, 153, 0.06);
|
||||
}
|
||||
|
||||
.nav-toggle-btn ::deep .nexus-icon {
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.nav-toggle-btn.active ::deep .nexus-icon {
|
||||
transform: scale(1.08);
|
||||
}
|
||||
|
||||
.nav-toggle-btn span {
|
||||
font-size: 0.6rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* SECTION CHECKPOINTS OVERLAY */
|
||||
.checkpoints-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 1400;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.checkpoints-overlay.is-open {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.checkpoints-backdrop {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
backdrop-filter: blur(3px);
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.checkpoints-overlay.is-open .checkpoints-backdrop {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.checkpoints-sheet {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-height: 50vh;
|
||||
background: rgba(15, 15, 15, 0.9);
|
||||
backdrop-filter: blur(20px);
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-top-left-radius: 16px;
|
||||
border-top-right-radius: 16px;
|
||||
box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
|
||||
z-index: 2;
|
||||
transform: translateY(100%);
|
||||
transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.checkpoints-overlay.is-open .checkpoints-sheet {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.checkpoints-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0.75rem 1.25rem;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.06);
|
||||
}
|
||||
|
||||
.checkpoints-header h4 {
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.close-checkpoints-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: rgba(255,255,255,0.5);
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.checkpoints-body {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 1rem 1.25rem;
|
||||
}
|
||||
|
||||
.empty-checkpoints {
|
||||
text-align: center;
|
||||
padding: 2rem 1rem;
|
||||
color: rgba(255,255,255,0.4);
|
||||
}
|
||||
|
||||
.empty-checkpoints p {
|
||||
font-size: 0.8rem;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.checkpoints-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.checkpoint-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.75rem;
|
||||
border-radius: 10px;
|
||||
background-color: rgba(255,255,255,0.02);
|
||||
border: 1px solid rgba(255,255,255,0.04);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.checkpoint-item:active {
|
||||
background-color: rgba(255,255,255,0.05);
|
||||
}
|
||||
|
||||
.checkpoint-item.active {
|
||||
background-color: rgba(0, 255, 153, 0.04);
|
||||
border-color: rgba(0, 255, 153, 0.15);
|
||||
}
|
||||
|
||||
.checkpoint-indicator {
|
||||
width: 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-right: 0.75rem;
|
||||
}
|
||||
|
||||
.indicator-dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background-color: rgba(255,255,255,0.3);
|
||||
}
|
||||
|
||||
.checkpoint-item.active .indicator-dot {
|
||||
background-color: var(--nexus-neon, #00FF99);
|
||||
box-shadow: 0 0 8px rgba(0, 255, 153, 0.6);
|
||||
}
|
||||
|
||||
.checkpoint-details {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.checkpoint-id {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 700;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.checkpoint-item.active .checkpoint-id {
|
||||
color: var(--nexus-neon, #00FF99);
|
||||
}
|
||||
|
||||
.checkpoint-label {
|
||||
font-size: 0.65rem;
|
||||
color: rgba(255,255,255,0.4);
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.arrow-icon {
|
||||
color: rgba(255,255,255,0.25);
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.checkpoint-item:active .arrow-icon {
|
||||
transform: translateX(2px);
|
||||
}
|
||||
Reference in New Issue
Block a user