import React from 'react'; import { Link } from 'react-router-dom'; import { Button } from '@/components/ui/button'; import { ArrowRight, ArrowLeft, ExternalLink } from 'lucide-react'; const CodeBlock = ({ children, title }: { children: string; title?: string }) => (
{title && (
{title}
)}
      {children}
    
); const QuickStart = () => { return (
{/* Header */}

Quick Start

Get started with idp.global in under 5 minutes. Choose between using our free hosted platform or self-hosting with Docker.

{/* Option 1: Hosted Platform */}

Option 1: Use Free Hosted Platform

The fastest way to get started. Create your free account on idp.global and start using it immediately. No installation required.

1

Create your account

Visit idp.global and sign up for a free account.

2

Create an organization

Set up your first organization and invite team members.

3

Register your application

Create an OAuth/OIDC client for your app and get your credentials.

{/* Option 2: Self-Host */}

Option 2: Self-Host with Docker

Deploy your own instance for complete control over your data and infrastructure.

Prerequisites

1. Pull the Docker image

{`docker pull code.foss.global/idp.global/idp.global`}

2. Run the container

{`docker run -d \\ -p 2999:2999 \\ -e MONGODB_URL=mongodb://your-mongo:27017/idp \\ -e IDP_BASEURL=https://your-domain.com \\ -e INSTANCE_NAME=my-idp \\ code.foss.global/idp.global/idp.global`}

3. Access your instance

Your idp.global instance is now running on port 2999. Configure your reverse proxy (nginx, traefik, etc.) to handle HTTPS and route traffic to the container.

{/* Integrate with your app */}

Integrate with Your Application

Once you have access to an idp.global instance, install the TypeScript client:

{`npm install @idp.global/idpclient`}

Basic Usage

{`import { IdpClient } from '@idp.global/idpclient'; // Initialize the client const idpClient = new IdpClient('https://idp.global'); // Enable WebSocket connection for real-time updates await idpClient.enableTypedSocket(); // Check if user is logged in const isLoggedIn = await idpClient.determineLoginStatus(); if (isLoggedIn) { // Get current user info const userInfo = await idpClient.whoIs(); console.log('User:', userInfo.user); // Get user's organizations const orgs = await idpClient.getRolesAndOrganizations(); console.log('Organizations:', orgs.organizations); }`}
{/* Navigation */}
); }; export default QuickStart;