Enhance application structure: Add runtime configuration for environment variables, integrate new dependencies for Cloudinary and UI components, and refactor member management features including improved forms and member dashboard. Update styles and layout for better user experience.

This commit is contained in:
Jennie Robinson Faber 2025-08-27 16:49:51 +01:00
parent 6e7e27ac4e
commit e4a0a9ab0f
61 changed files with 7902 additions and 950 deletions

54
app/config/circles.js Normal file
View file

@ -0,0 +1,54 @@
// Central configuration for Ghost Guild Circles
export const CIRCLES = {
COMMUNITY: {
value: 'community',
label: 'Community Circle',
description: 'For individuals interested in learning about cooperative principles',
features: [
'Game workers curious about co-ops, researchers, industry allies',
'People exploring alternative work models',
'Access to community forums and resources'
]
},
FOUNDER: {
value: 'founder',
label: 'Founder Circle',
description: 'For those actively establishing or growing their cooperative studio',
features: [
'Has two tracks: Peer Accelerator Prep Track and Indie Track',
'Teams working toward PA application',
'Early-stage co-op studios',
'Studios transitioning to co-op model'
]
},
PRACTITIONER: {
value: 'practitioner',
label: 'Practitioner Circle',
description: 'For Peer Accelerator alumni and experienced studio leaders',
features: [
'Those implementing cooperative models',
'Industry mentors and advisors',
'Expert-level workshops and mentorship opportunities'
]
}
};
// Get all circle options as an array (useful for forms)
export const getCircleOptions = () => {
return Object.values(CIRCLES);
};
// Get valid circle values for validation
export const getValidCircleValues = () => {
return Object.values(CIRCLES).map(circle => circle.value);
};
// Get circle by value
export const getCircleByValue = (value) => {
return Object.values(CIRCLES).find(circle => circle.value === value);
};
// Check if a circle value is valid
export const isValidCircleValue = (value) => {
return getValidCircleValues().includes(value);
};

108
app/config/contributions.js Normal file
View file

@ -0,0 +1,108 @@
// Central configuration for Ghost Guild Contribution Levels and Helcim Plans
export const CONTRIBUTION_TIERS = {
FREE: {
value: '0',
amount: 0,
label: '$0 - I need support right now',
tier: 'free',
helcimPlanId: null, // No Helcim plan needed for free tier
features: [
'Access to basic resources',
'Community forum access'
]
},
SUPPORTER: {
value: '5',
amount: 5,
label: '$5 - I can contribute a little',
tier: 'supporter',
helcimPlanId: 'supporter-monthly-5',
features: [
'All Free Membership benefits',
'Priority community support',
'Early access to events'
]
},
MEMBER: {
value: '15',
amount: 15,
label: '$15 - I can sustain the community',
tier: 'member',
helcimPlanId: 'member-monthly-15',
features: [
'All Supporter benefits',
'Access to premium workshops',
'Monthly 1-on-1 sessions',
'Advanced resource library'
]
},
ADVOCATE: {
value: '30',
amount: 30,
label: '$30 - I can support others too',
tier: 'advocate',
helcimPlanId: 'advocate-monthly-30',
features: [
'All Member benefits',
'Weekly group mentoring',
'Access to exclusive events',
'Direct messaging with experts'
]
},
CHAMPION: {
value: '50',
amount: 50,
label: '$50 - I want to sponsor multiple members',
tier: 'champion',
helcimPlanId: 'champion-monthly-50',
features: [
'All Advocate benefits',
'Personal mentoring sessions',
'VIP event access',
'Custom project support',
'Annual strategy session'
]
}
};
// Get all contribution options as an array (useful for forms)
export const getContributionOptions = () => {
return Object.values(CONTRIBUTION_TIERS);
};
// Get valid contribution values for validation
export const getValidContributionValues = () => {
return Object.values(CONTRIBUTION_TIERS).map(tier => tier.value);
};
// Get contribution tier by value
export const getContributionTierByValue = (value) => {
return Object.values(CONTRIBUTION_TIERS).find(tier => tier.value === value);
};
// Get Helcim plan ID for a contribution tier
export const getHelcimPlanId = (contributionValue) => {
const tier = getContributionTierByValue(contributionValue);
return tier?.helcimPlanId || null;
};
// Check if a contribution tier requires payment
export const requiresPayment = (contributionValue) => {
const tier = getContributionTierByValue(contributionValue);
return tier?.amount > 0;
};
// Check if a contribution value is valid
export const isValidContributionValue = (value) => {
return getValidContributionValues().includes(value);
};
// Get contribution tier by Helcim plan ID
export const getContributionTierByHelcimPlan = (helcimPlanId) => {
return Object.values(CONTRIBUTION_TIERS).find(tier => tier.helcimPlanId === helcimPlanId);
};
// Get paid tiers only (excluding free tier)
export const getPaidContributionTiers = () => {
return Object.values(CONTRIBUTION_TIERS).filter(tier => tier.amount > 0);
};