Initial commit: SmoothSchedule multi-tenant scheduling platform

This commit includes:
- Django backend with multi-tenancy (django-tenants)
- React + TypeScript frontend with Vite
- Platform administration API with role-based access control
- Authentication system with token-based auth
- Quick login dev tools for testing different user roles
- CORS and CSRF configuration for local development
- Docker development environment setup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
poduck
2025-11-27 01:43:20 -05:00
commit 2e111364a2
567 changed files with 96410 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
/**
* Platform OAuth Settings API
*/
import apiClient from './client';
export interface OAuthProviderConfig {
enabled: boolean;
client_id: string;
client_secret: string;
// Apple-specific fields
team_id?: string;
key_id?: string;
// Microsoft-specific field
tenant_id?: string;
}
export interface PlatformOAuthSettings {
// Global setting
oauth_allow_registration: boolean;
// Provider configurations
google: OAuthProviderConfig;
apple: OAuthProviderConfig;
facebook: OAuthProviderConfig;
linkedin: OAuthProviderConfig;
microsoft: OAuthProviderConfig;
twitter: OAuthProviderConfig;
twitch: OAuthProviderConfig;
}
export interface PlatformOAuthSettingsUpdate {
oauth_allow_registration?: boolean;
// Google
oauth_google_enabled?: boolean;
oauth_google_client_id?: string;
oauth_google_client_secret?: string;
// Apple
oauth_apple_enabled?: boolean;
oauth_apple_client_id?: string;
oauth_apple_client_secret?: string;
oauth_apple_team_id?: string;
oauth_apple_key_id?: string;
// Facebook
oauth_facebook_enabled?: boolean;
oauth_facebook_client_id?: string;
oauth_facebook_client_secret?: string;
// LinkedIn
oauth_linkedin_enabled?: boolean;
oauth_linkedin_client_id?: string;
oauth_linkedin_client_secret?: string;
// Microsoft
oauth_microsoft_enabled?: boolean;
oauth_microsoft_client_id?: string;
oauth_microsoft_client_secret?: string;
oauth_microsoft_tenant_id?: string;
// Twitter (X)
oauth_twitter_enabled?: boolean;
oauth_twitter_client_id?: string;
oauth_twitter_client_secret?: string;
// Twitch
oauth_twitch_enabled?: boolean;
oauth_twitch_client_id?: string;
oauth_twitch_client_secret?: string;
}
/**
* Get platform OAuth settings
*/
export const getPlatformOAuthSettings = async (): Promise<PlatformOAuthSettings> => {
const { data } = await apiClient.get('/api/platform/settings/oauth/');
return data;
};
/**
* Update platform OAuth settings
*/
export const updatePlatformOAuthSettings = async (
settings: PlatformOAuthSettingsUpdate
): Promise<PlatformOAuthSettings> => {
const { data } = await apiClient.post('/api/platform/settings/oauth/', settings);
return data;
};