added community version

This commit is contained in:
2025-10-24 23:52:57 +02:00
parent 05fa87c638
commit 5e7c5aabfb
12 changed files with 17913 additions and 2328 deletions

View File

@@ -1,7 +1,5 @@
{ {
"name": "schichtplan-backend", "name": "schichtplan-backend",
"license": "SEE LICENSE IN LICENSE.md",
"author": "Patrick <dev.patrick@inca-vikingo.de>",
"version": "1.0.0", "version": "1.0.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
@@ -35,4 +33,4 @@
"typescript": "^5.0.0", "typescript": "^5.0.0",
"tsx": "^4.0.0" "tsx": "^4.0.0"
} }
} }

View File

@@ -1,15 +1,22 @@
{ {
"extends": "../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "./dist", "outDir": "./dist",
"rootDir": "./src", "rootDir": "./src",
"module": "ESNext", "strict": true,
"moduleResolution": "bundler" "esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true
}, },
"include": [ "include": [
"src/**/*" "src/**/*"
], ],
"references": [ "exclude": [
{ "path": "../premium" } "node_modules",
"dist"
] ]
} }

View File

@@ -1,4 +1,4 @@
# frontend/.env.development # frontend/.env.development
BROWSER=none #BROWSER=none
FAST_REFRESH=true #FAST_REFRESH=true
DANGEROUSLY_DISABLE_HOST_CHECK=true #DANGEROUSLY_DISABLE_HOST_CHECK=true

View File

@@ -0,0 +1,18 @@
// frontend/config-overrides.js
const path = require('path');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
module.exports = function override(config) {
// Erlaube Imports außerhalb von src/
config.resolve.plugins = config.resolve.plugins.filter(
plugin => !(plugin instanceof ModuleScopePlugin)
);
// Alias konfigurieren
config.resolve.alias = {
...config.resolve.alias,
'@premium-frontend': path.resolve(__dirname, '../premium/frontendPRO/src')
};
return config;
};

View File

@@ -12,28 +12,47 @@
"@testing-library/user-event": "^13.5.0", "@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2", "@types/jest": "^27.5.2",
"@types/node": "^16.18.126", "@types/node": "^16.18.126",
"@types/react": "^19.2.2", "@types/react": "^18.0.28",
"@types/react-dom": "^19.2.1", "@types/react-dom": "^18.0.11",
"@types/react-router-dom": "^5.3.3", "@types/react-router-dom": "^5.3.3",
"react": "^19.2.0", "react": "^18.2.0",
"react-dom": "^19.2.0", "react-dom": "^18.2.0",
"react-router-dom": "^7.9.3", "react-router-dom": "^6.8.0",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"web-vitals": "^2.1.4" "web-vitals": "^2.1.4"
}, },
"scripts": { "scripts": {
"dev": "vite", "start": "react-scripts start",
"build": "tsc --noEmit && vite build", "start:pro": "set REACT_APP_ENABLE_PRO=true&& react-scripts start",
"build:community": "vite build", "build": "react-scripts build",
"build:commercial": "git submodule update --init --recursive && ENABLE_PRO=true vite build", "build:community": "react-scripts build",
"preview": "vite preview" "build:commercial": "set REACT_APP_ENABLE_PRO=true && react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"type-check": "tsc --noEmit",
"dev": "react-scripts start",
"dev:pro": "set REACT_APP_ENABLE_PRO=true && react-scripts start"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}, },
"devDependencies": { "devDependencies": {
"@types/react": "^18.0.27", "http-proxy-middleware": "^3.0.5",
"@types/react-dom": "^18.0.10", "react-scripts": "^5.0.1"
"@types/node": "^20.0.0",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "^5.3.3",
"vite": "^5.0.8"
} }
} }

View File

@@ -20,40 +20,10 @@ import Setup from './pages/Setup/Setup';
import FAQ from './components/Layout/FooterLinks/FAQ/FAQ'; import FAQ from './components/Layout/FooterLinks/FAQ/FAQ';
import About from './components/Layout/FooterLinks/About/About'; import About from './components/Layout/FooterLinks/About/About';
import Features from './components/Layout/FooterLinks/Features/Features'; import Features from './components/Layout/FooterLinks/Features/Features';
import { CommunityContact, CommunityLegalPage } from './components/Layout/FooterLinks/CommunityLinks/communityLinks';
// Feature flag from environment // Feature flag from environment
const ENABLE_PRO = process.env.ENABLE_PRO === 'true'; const ENABLE_PRO = process.env.REACT_APP_ENABLE_PRO === 'true';
// Community fallback components (always available)
const CommunityContact: React.FC = () => (
<div style={{ padding: '40px 20px', maxWidth: '800px', margin: '0 auto' }}>
<h1>📞 Kontakt</h1>
<div style={{ backgroundColor: 'white', borderRadius: '12px', padding: '30px', marginTop: '20px' }}>
<h2 style={{ color: '#2c3e50' }}>Community Edition</h2>
<p>Kontaktfunktionen sind in der Premium Edition verfügbar.</p>
<p>
<a href="/features" style={{ color: '#3498db' }}>
Zu den Features
</a>
</p>
</div>
</div>
);
const CommunityLegalPage: React.FC<{ title: string }> = ({ title }) => (
<div style={{ padding: '40px 20px', maxWidth: '800px', margin: '0 auto' }}>
<h1>📄 {title}</h1>
<div style={{ backgroundColor: 'white', borderRadius: '12px', padding: '30px', marginTop: '20px' }}>
<h2 style={{ color: '#2c3e50' }}>Community Edition</h2>
<p>Rechtliche Dokumentation ist in der Premium Edition verfügbar.</p>
<p>
<a href="/features" style={{ color: '#3498db' }}>
Erfahren Sie mehr über Premium
</a>
</p>
</div>
</div>
);
// Conditional Premium Components // Conditional Premium Components
let PremiumContact: React.FC = CommunityContact; let PremiumContact: React.FC = CommunityContact;
@@ -66,7 +36,7 @@ if (ENABLE_PRO) {
try { try {
// Use require with type assertions to avoid dynamic import issues // Use require with type assertions to avoid dynamic import issues
const premiumModule = require('@premium-frontend/components/FooterLinks'); const premiumModule = require('@premium-frontend/components/FooterLinks');
if (premiumModule.Contact) PremiumContact = premiumModule.Contact; if (premiumModule.Contact) PremiumContact = premiumModule.Contact;
if (premiumModule.Privacy) PremiumPrivacy = premiumModule.Privacy; if (premiumModule.Privacy) PremiumPrivacy = premiumModule.Privacy;
if (premiumModule.Imprint) PremiumImprint = premiumModule.Imprint; if (premiumModule.Imprint) PremiumImprint = premiumModule.Imprint;

View File

@@ -182,20 +182,6 @@ const Footer: React.FC = () => {
> >
Funktionen Funktionen
</a> </a>
<a
href="/pricing"
style={styles.footerLink}
onMouseEnter={(e) => {
e.currentTarget.style.color = '#FBFAF6';
e.currentTarget.style.transform = 'translateX(4px)';
}}
onMouseLeave={(e) => {
e.currentTarget.style.color = 'rgba(251, 250, 246, 0.7)';
e.currentTarget.style.transform = 'translateX(0)';
}}
>
Preise
</a>
</div> </div>
</div> </div>

View File

@@ -0,0 +1,37 @@
import React from 'react';
export const CommunityContact: React.FC = () => (
<div style={{ padding: '40px 20px', maxWidth: '800px', margin: '0 auto' }}>
<h1>📞 Kontakt</h1>
<div style={{ backgroundColor: 'white', borderRadius: '12px', padding: '30px', marginTop: '20px' }}>
<h2 style={{ color: '#2c3e50' }}>Community Edition</h2>
<p>Kontaktfunktionen sind in der Premium Edition verfügbar.</p>
<p>
<a href="/features" style={{ color: '#3498db' }}>
Zu den Features
</a>
</p>
</div>
</div>
);
export const CommunityLegalPage: React.FC<{ title: string }> = ({ title }) => (
<div style={{ padding: '40px 20px', maxWidth: '800px', margin: '0 auto' }}>
<h1>📄 {title}</h1>
<div style={{ backgroundColor: 'white', borderRadius: '12px', padding: '30px', marginTop: '20px' }}>
<h2 style={{ color: '#2c3e50' }}>Community Edition</h2>
<p>Rechtliche Dokumentation ist in der Premium Edition verfügbar.</p>
<p>
<a href="/features" style={{ color: '#3498db' }}>
Erfahren Sie mehr über Premium
</a>
</p>
</div>
</div>
);
// Optional: Barrel export für einfachere Imports
export default {
CommunityContact,
CommunityLegalPage
};

View File

@@ -1,22 +1,28 @@
// frontend/tsconfig.json - SO FUNKTIONIERT ES
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2022", "target": "es5",
"lib": ["ES2022", "DOM", "DOM.Iterable"], "lib": [
"jsx": "react-jsx", "dom",
"noEmit": true, "dom.iterable",
"allowImportingTsExtensions": true, "esnext"
],
"allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true, "esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"paths": { "noEmit": true,
"@premium-frontend/*": ["../premium/frontendPRO/src/*"] "jsx": "react-jsx",
} "ignoreDeprecations": "6.0",
"downlevelIteration": true
}, },
"include": [ "include": [
"src/**/*" "src"
] ]
} }

View File

@@ -1,17 +0,0 @@
// frontend/vite.config.ts
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { resolve } from 'path';
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': resolve(__dirname, './src'),
'@premium-frontend': resolve(__dirname, '../premium/frontendPRO/src')
}
},
define: {
'process.env.ENABLE_PRO': JSON.stringify(process.env.ENABLE_PRO === 'true')
}
});

20007
package-lock.json generated

File diff suppressed because it is too large Load Diff

Submodule premium updated: 6da71aebad...ce4b3fd6e0