move static data
This commit is contained in:
@@ -4,45 +4,111 @@
|
||||
* Values are primarily sourced from environment variables so that
|
||||
* deployments can provide real company details without hard-coding
|
||||
* production data in the repository.
|
||||
*
|
||||
* Website must remain an API consumer (no adapter imports).
|
||||
*/
|
||||
|
||||
const env = {
|
||||
platformName: process.env.NEXT_PUBLIC_SITE_NAME,
|
||||
platformUrl: process.env.NEXT_PUBLIC_SITE_URL,
|
||||
supportEmail: process.env.NEXT_PUBLIC_SUPPORT_EMAIL,
|
||||
sponsorEmail: process.env.NEXT_PUBLIC_SPONSOR_EMAIL,
|
||||
legalCompanyName: process.env.NEXT_PUBLIC_LEGAL_COMPANY_NAME,
|
||||
legalVatId: process.env.NEXT_PUBLIC_LEGAL_VAT_ID,
|
||||
legalRegisteredCountry: process.env.NEXT_PUBLIC_LEGAL_REGISTERED_COUNTRY,
|
||||
legalRegisteredAddress: process.env.NEXT_PUBLIC_LEGAL_REGISTERED_ADDRESS,
|
||||
} as const;
|
||||
|
||||
export const siteConfig = {
|
||||
export interface SiteConfigData {
|
||||
// Platform Information
|
||||
platformName: env.platformName ?? 'GridPilot',
|
||||
platformUrl: env.platformUrl ?? 'https://gridpilot.com',
|
||||
platformName: string;
|
||||
platformUrl: string;
|
||||
|
||||
// Contact Information
|
||||
supportEmail: env.supportEmail ?? 'support@example.com',
|
||||
sponsorEmail: env.sponsorEmail ?? 'sponsors@example.com',
|
||||
supportEmail: string;
|
||||
sponsorEmail: string;
|
||||
|
||||
// Legal & Business Information
|
||||
legal: {
|
||||
companyName: env.legalCompanyName ?? '',
|
||||
vatId: env.legalVatId ?? '',
|
||||
registeredCountry: env.legalRegisteredCountry ?? '',
|
||||
registeredAddress: env.legalRegisteredAddress ?? '',
|
||||
},
|
||||
|
||||
companyName: string;
|
||||
vatId: string;
|
||||
registeredCountry: string;
|
||||
registeredAddress: string;
|
||||
};
|
||||
|
||||
// Platform Fees
|
||||
fees: {
|
||||
platformFeePercent: 10, // 10% platform fee on sponsorships
|
||||
description: 'Platform fee supports maintenance, analytics, and secure payment processing.',
|
||||
},
|
||||
|
||||
platformFeePercent: number;
|
||||
description: string;
|
||||
};
|
||||
|
||||
// VAT Information
|
||||
vat: {
|
||||
euReverseChargeApplies: boolean;
|
||||
nonEuVatExempt: boolean;
|
||||
standardRate: number;
|
||||
notice: string;
|
||||
euBusinessNotice: string;
|
||||
nonEuNotice: string;
|
||||
};
|
||||
|
||||
// Sponsorship Types Available
|
||||
sponsorshipTypes: {
|
||||
leagues: {
|
||||
enabled: boolean;
|
||||
title: string;
|
||||
description: string;
|
||||
};
|
||||
teams: {
|
||||
enabled: boolean;
|
||||
title: string;
|
||||
description: string;
|
||||
};
|
||||
drivers: {
|
||||
enabled: boolean;
|
||||
title: string;
|
||||
description: string;
|
||||
};
|
||||
races: {
|
||||
enabled: boolean;
|
||||
title: string;
|
||||
description: string;
|
||||
};
|
||||
platform: {
|
||||
enabled: boolean;
|
||||
title: string;
|
||||
description: string;
|
||||
};
|
||||
};
|
||||
|
||||
// Feature Flags for Sponsorship Features
|
||||
features: {
|
||||
liveryPlacement: boolean;
|
||||
leaguePageBranding: boolean;
|
||||
racePageBranding: boolean;
|
||||
profileBadges: boolean;
|
||||
socialMediaMentions: boolean;
|
||||
newsletterInclusion: boolean;
|
||||
homepageAds: boolean;
|
||||
sidebarAds: boolean;
|
||||
broadcastOverlays: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export const siteConfig: SiteConfigData = {
|
||||
// Platform Information
|
||||
platformName: process.env.NEXT_PUBLIC_SITE_NAME ?? 'GridPilot',
|
||||
platformUrl: process.env.NEXT_PUBLIC_SITE_URL ?? 'https://gridpilot.com',
|
||||
|
||||
// Contact Information
|
||||
supportEmail: process.env.NEXT_PUBLIC_SUPPORT_EMAIL ?? 'support@example.com',
|
||||
sponsorEmail: process.env.NEXT_PUBLIC_SPONSOR_EMAIL ?? 'sponsors@example.com',
|
||||
|
||||
// Legal & Business Information
|
||||
legal: {
|
||||
companyName: process.env.NEXT_PUBLIC_LEGAL_COMPANY_NAME ?? '',
|
||||
vatId: process.env.NEXT_PUBLIC_LEGAL_VAT_ID ?? '',
|
||||
registeredCountry: process.env.NEXT_PUBLIC_LEGAL_REGISTERED_COUNTRY ?? '',
|
||||
registeredAddress: process.env.NEXT_PUBLIC_LEGAL_REGISTERED_ADDRESS ?? '',
|
||||
},
|
||||
|
||||
// Platform Fees
|
||||
fees: {
|
||||
platformFeePercent: 10,
|
||||
description: 'Platform fee supports maintenance, analytics, and secure payment processing.',
|
||||
},
|
||||
|
||||
// VAT Information
|
||||
vat: {
|
||||
// Note: All prices displayed are exclusive of VAT
|
||||
euReverseChargeApplies: true,
|
||||
nonEuVatExempt: true,
|
||||
standardRate: 20,
|
||||
@@ -50,7 +116,7 @@ export const siteConfig = {
|
||||
euBusinessNotice: 'EU businesses with a valid VAT ID may apply reverse charge.',
|
||||
nonEuNotice: 'Non-EU businesses are not charged VAT.',
|
||||
},
|
||||
|
||||
|
||||
// Sponsorship Types Available
|
||||
sponsorshipTypes: {
|
||||
leagues: {
|
||||
@@ -79,10 +145,9 @@ export const siteConfig = {
|
||||
description: 'Reach the entire GridPilot audience with strategic platform placements.',
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
// Feature Flags for Sponsorship Features
|
||||
features: {
|
||||
// What sponsors can actually get (no broadcast control)
|
||||
liveryPlacement: true,
|
||||
leaguePageBranding: true,
|
||||
racePageBranding: true,
|
||||
@@ -91,8 +156,7 @@ export const siteConfig = {
|
||||
newsletterInclusion: true,
|
||||
homepageAds: true,
|
||||
sidebarAds: true,
|
||||
// We don't control these
|
||||
broadcastOverlays: false, // We don't control broadcast
|
||||
broadcastOverlays: false,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user