# Errors Source: https://docs.launch-express.com/api-reference/errors Launch Express returns machine readable error codes, human readable error messages and a link to the docs for more information. The Starter Kit returns machine readable error codes, human readable error messages and a link to the docs for more information. Here is how an error response looks like: ```json { "message": "Not authenticated" } ``` ## Error Codes Here is a list of all error codes that the Starter Kit returns: ### `unauthorized` * **Status:** 401 * **Problem:** The request has not been applied because it lacks valid authentication. * **Solution:** Make sure you are using the correct API key or access token. ### `not_found` * **Status:** 404 * **Problem:** The resource you are trying to access does not exist. * **Solution:** Check the request and make sure the resource exists. ### `rate_limit_exceeded` * **Status:** 429 * **Problem:** The request has been rate limited. * **Solution:** Wait for a while and try again. ### `internal_server_error` * **Status:** 500 * **Problem:** The server encountered an unexpected condition that prevented it from fulfilling the request. * **Solution:** Try again later. If the problem persists, contact support. # Get Icon Source: https://docs.launch-express.com/api-reference/icon-endpoint/get GET /icon/{name} Returns a social icon or logo as an image based on the name parameter and optional query parameters. You could specify the icons inside the `src/components/global/icons.tsx` file. # Introduction Source: https://docs.launch-express.com/api-reference/introduction Learn about the User Management API endpoints for Launch Express ## Welcome This documentation describes the User Management API endpoints for Launch Express. The API provides secure user management capabilities through Better-Auth authentication. ## Base URL The Base URL for all API endpoints is: ```bash Terminal http://localhost:3000/api ``` ## Authentication All endpoints are protected using Better-Auth cookie-based authentication. Requests must include a valid session cookie obtained through the Better-Auth authentication flow. ## Response Codes The API returns standard HTTP response codes to indicate the success or failure of an API request. Here are a few examples: | Code | Description | | ----- | ------------------------------------------ | | `200` | The request was successful. | | `401` | The request requires user authentication. | | `404` | The requested resource could not be found. | | `429` | Too many requests. | | `500` | Internal server error. | # Get Own Plan Source: https://docs.launch-express.com/api-reference/plan-endpoint/get GET /user/plan Retrieves the current user's subscription plan details # Retrieve a specific user Source: https://docs.launch-express.com/api-reference/specific-user-endpoint/get GET /user/{id} Retrieve a specific user by their ID. # Retrieve own profile Source: https://docs.launch-express.com/api-reference/user-endpoint/get GET /user Retrieve the profile of the currently authenticated user. # Update Own Profile Source: https://docs.launch-express.com/api-reference/user-endpoint/put PUT /user Updates the currently authenticated user's profile # Retrieve all users Source: https://docs.launch-express.com/api-reference/users-endpoint/get GET /users Retrieve all users in the database with their details. This endpoint is only accessible to admin users. # CLI Source: https://docs.launch-express.com/cli The Launch Express CLI is a command-line interface tool that helps you generate and manage your Launch Express project. This documentation covers the setup and usage of the CLI. ## Usage ```bash npx launch-express@latest ``` ## Commands ### `new` Generates a new Launch Express project. ```bash npx launch-express@latest new ``` If you want to generate a new project with default settings, you can use the following command: ```bash npx launch-express@latest new --default ``` This will generate a new project with default settings: * Better-auth authentication * Stripe payments * Google OAuth * PostgreSQL database * No Analytics ### `update` Updates the Launch Express project. ```bash npx launch-express@latest update ``` ### `generate-schema` Updates the Better-auth schema for the Launch Express project with the existing database schema. ```bash npx launch-express@latest generate-schema ``` # Account menu Source: https://docs.launch-express.com/components/account-menu Show a menu button for the authenticated users AccountMenu AccountMenu Dark ```javascript page.tsx import AccountMenu from "@/components/account-menu"; ``` You can use the `Billing` redirect to show the billing page when the user clicks on the billing option. You only need to add the `useBilling` prop and it must be exist an CustomerID of the user of the payment service in the database. ## Properties Whether to show the billing option in the menu Whether to show the theme option in the menu ## Usage Example usage of the `AccountMenu` component : ```javascript example.tsx import AccountMenu from "@/components/account-menu"; export default function Example() { return <>{session && }; } ``` If you need basic components like buttons, inputs, and more, they are available with [Shadcn UI](https://ui.shadcn.com/docs). # Animated Source: https://docs.launch-express.com/components/animated The Animated component is a versatile wrapper that adds animations to its children elements. It leverages Motion React to provide smooth, customizable animations for enhancing user interface interactions. ```javascript page.tsx import Animated from "@/components/animated"; ``` ## Properties The HTML element or React component to render The animation variant to apply, currently there are 5 presets: 'slideUp', 'slideDown', 'slideUpBlur', 'fadeIn', 'scaleIn', or you can pass a custom variant object Whether to animate when the component enters the viewport Custom CSS classes to apply to the component ## Usage ```javascript example.tsx import Animated from "@/components/animated"; export default function Example() { return (

Hello, world!

This is an example of the Animated component.

); } ``` If you need basic components like buttons, inputs, and more, they are available with [Shadcn UI](https://ui.shadcn.com/docs). # Authentication Button Source: https://docs.launch-express.com/components/authentication-button The Authentication Button component provides a dynamic button for handling user authentication actions. It adapts its behavior and appearance based on the current authentication status and type of action required. Authentication Button ```javascript page.tsx import AuthenticationButton from "@/components/authentication-button"; ``` ## Properties The type of authentication action this button should perform Custom CSS classes to apply to the button Custom text to display on the button Redirects to the given path after the authentication Optional animation effect for the button ## Usage ```javascript example.tsx export default function Example() { return ( ); } ``` This AuthenticationButton component can be used in various parts of your application where user authentication is required. It automatically adapts its appearance and functionality based on the current authentication status, providing a seamless user experience. If you need basic components like buttons, inputs, and more, they are available with [Shadcn UI](https://ui.shadcn.com/docs). # Big Icon Source: https://docs.launch-express.com/components/big-icon The Big Icon component is designed to display a large icon prominently on your website. It accepts an `icon` as a string or a Component like a Icon. FAQ FAQ Dark ```javascript page.tsx import BigIcon from "@/components/big-icon"; ``` ## Properties The icon to display Custom styling for the component. You can replace the colors of the icon by using the `text-[color]` and `bg-[color]` classes with the background opacity of 20%. ## Usage ```javascript example.tsx } /> ``` If you need basic components like buttons, inputs, and more, they are available with [Shadcn UI](https://ui.shadcn.com/docs). # Checkout Button Source: https://docs.launch-express.com/components/checkout-button This component opens a checkout session for Stripe or Lemonsqueezy. It can be used to initiate a payment or subscription process for your application. Just change the `mode: 'payment'` for one-time payments or `mode: 'subscription'` for recurring payments like a monthly membership. This component is using the [Stripe Checkout](https://stripe.com/docs/payments/checkout) or [Lemonsqueezy Checkout](https://docs.lemonsqueezy.com/help/checkout) APIs based on the payment processor you choose in the [configuration](/configuration) file. Checkout Button ```javascript page.tsx import CheckoutButton from "@/components/checkout-button"; ``` ## Properties The mode of payment for the checkout process The ID of the price or plan for the checkout Custom text to display on the button Optional discount ID to apply to the checkout Optional email to pre-fill in the checkout form Custom styling for the component. You can customize the button's appearance using Tailwind classes. Optional animation effect for the button Optional URL to redirect to after the checkout Optional user ID to associate with the checkout ## Usage ```javascript example.tsx ``` ### Tips When creating copy for your Checkout Button: * Use action-oriented language (e.g., "Buy Now", "Subscribe Today", "Get Started".) * Include price or key benefit if applicable (e.g., "Start Free Trial", "Join for \$9.99/month") * Create urgency when appropriate (e.g., "Limited Time Offer") * Keep text concise and clear If you need basic components like buttons, inputs, and more, they are available with [Shadcn UI](https://ui.shadcn.com/docs). # CTA Source: https://docs.launch-express.com/components/cta The CTA (Call to Action) component is designed to create an engaging section that encourages users to take a specific action. It features animated elements, customizable buttons, and highlighted benefits. CTA CTA Dark ```javascript page.tsx import CTA from "@/components/cta"; ``` ## Properties Title of the CTA Description of the CTA Text of the primary button Redirect to the given path when the primary button is clicked Whether to display a booking option alongside the main CTA Custom CSS classes to apply to the component ## Usage ```javascript example.tsx ``` The CTA component creates a visually appealing section with animated elements, a primary "Get Started" button, an optional "Book a Demo" button, and highlighted benefits. It's designed to grab user attention and encourage immediate action. ### Tips When customizing the text in the CTA component, keep the following in mind: * Use action-oriented language in the main heading (e.g., "Unlock premium features") * Keep benefit statements short and impactful * Use strong verbs that encourage immediate action for the button text that clearly communicates the next step (e.g. "Get Started", "Try it Free", "Learn More") If you need basic components like buttons, inputs, and more, they are available with [Shadcn UI](https://ui.shadcn.com/docs). # Dark mode toggle Source: https://docs.launch-express.com/components/dark-mode-toggle The Dark Mode Toggle component provides an easy-to-use button for switching between light and dark themes in your application. It uses the next-themes library for theme management and displays appropriate icons based on the current theme. Dark Mode Toggle Dark Mode Toggle Dark ```javascript page.tsx import DarkModeToggle from "@/components/dark-mode-toggle"; ``` You can also set up the initial theme in the [configuration](/theme-setup) file. ## Properties Custom CSS classes to apply to the component ## Usage Dark Mode Toggle Dark ```javascript example.tsx import DarkModeToggle from "@/components/dark-mode-toggle"; export default function Example() { return (
); } ``` The Dark Mode Toggle component creates a button that allows users to switch between light and dark themes. It automatically handles the theme change and updates the button's icon to reflect the current theme. If you need basic components like buttons, inputs, and more, they are available with [Shadcn UI](https://ui.shadcn.com/docs). # FAQ Source: https://docs.launch-express.com/components/faq The FAQ component is designed to display a list of frequently asked questions and answers in an interactive accordion format. It provides an animated, expandable interface for users to easily access information. FAQ FAQ Dark ```javascript page.tsx import FAQ from "@/components/faq"; ``` ## Properties Title of the FAQ Description of the FAQ Array of FAQs with question and answer Custom CSS classes to apply to the component ## Usage ```javascript example.tsx ``` The FAQ component creates a section with a list of frequently asked questions. Each question can be expanded to reveal its answer, using an accordion-style interaction. ### Tips When creating content for the FAQ component: * Keep questions concise and directly related to common user inquiries * Provide clear, comprehensive answers without being overly verbose * Order the FAQs from most to least common or by topic relevance * Regularly update the FAQ content based on user feedback and support tickets If you need basic components like buttons, inputs, and more, they are available with [Shadcn UI](https://ui.shadcn.com/docs). # Feature Source: https://docs.launch-express.com/components/feature The Feature component is designed to showcase a list of product features in an visually appealing and responsive layout. Each feature is presented with an icon, title, subtitle, description, and an accompanying image or video. Feature Feature Dark ```javascript page.tsx import Feature from "@/components/feature"; ``` ## Properties Whether to apply scroll transformation to the feature section ### Usage ```javascript example.tsx ``` The Feature component creates a section that displays a list of product features. Each feature is presented in an alternating layout with text on one side and an image or video on the other. ### Tips When creating content for the Feature component: * Keep feature titles short and impactful * Use subtitles to provide a quick summary of the feature * Write concise descriptions that highlight the benefit to the user * Choose icons that visually represent each feature * Use high-quality images or videos that demonstrate the feature in action If you need basic components like buttons, inputs, and more, they are available with [Shadcn UI](https://ui.shadcn.com/docs). # Feature Accordion Source: https://docs.launch-express.com/components/feature-accordion The FeatureAccordion component presents a list of product features in an interactive, accordion-style layout. It combines text descriptions with images or videos, adapting to different screen sizes for optimal user experience. Feature Accordion Feature Accordion Dark ```javascript page.tsx import FeatureAccordion from "@/components/feature-accordion"; ``` ## Properties Determines the layout direction. If true, the accordion appears on the right side on larger screens. Title of the feature accordion Description of the feature accordion ## Usage ```javascript example.tsx ``` The FeatureAccordion component creates a section that displays a list of product features in an interactive accordion format, with accompanying images or videos. Remember to keep your feature descriptions focused on the benefits to the user, not just the technical aspects of the feature. ### Tips When creating content for the Feature Accordion component: * Keep feature titles concise and descriptive * Write clear, benefit-focused descriptions for each feature * Use high-quality images or videos that illustrate each feature in action * Ensure the content is consistent in length across features for a balanced appearance * Order features by importance or logical flow of user interaction with your product If you need basic components like buttons, inputs, and more, they are available with [Shadcn UI](https://ui.shadcn.com/docs). # Footer Source: https://docs.launch-express.com/components/footer The footer of the website Footer Footer Dark The footer section is an integral part of your website's layout, found at the bottom of each page. It typically includes essential links such as terms of service, privacy policy, and contact information. Additionally, it may showcase social media icons for easy access to your online presence. The footer provides users with important information and enhances navigation, ensuring a seamless browsing experience. ```javascript page.tsx import Footer from "@/components/footer"; ``` ## Usage ```javascript example.tsx