DreamFactory Documentation

website·Indexed 30 days ago

https://docs-playground.vercel.app

Guides and tutorials for DreamFactory, covering installation on Linux, Windows, and Docker, basic configuration settings, and API creation and management including File, Email, Auth, and Source Control APIs.

Tokens
4.6K
Snippets
28
Records
49
Agent score
71%

What's inside DreamFactory

  1. Deploy DreamFactory in a customer-hosted environment

    DreamFactory is a scalable, stateless, and portable platform. It does not offer a managed cloud service; instead, it must be hosted by the customer on bare metal, within a Virtual Machine (VM), or inside a container.
  2. Build a Docusaurus site for production

    Docusaurus is a static-site-generator that compiles your site into static HTML, JavaScript, and CSS files. To generate these production files, run the build command. The resulting static assets are placed in the build folder.
    npm run build
  3. Create and organize blog posts in Docusaurus

    Docusaurus blogging features are powered by the @docusaurus/plugin-content-blog plugin. To create blog posts, add Markdown files or folders to the blog directory. You can co-locate images within a blog post folder for better organization. Blog post dates are automatically extracted from filenames using the format YYYY-MM-DD-title.md or by placing an index.md inside a folder named YYYY-MM-DD-title.
    # Example filename patterns for date extraction:
    2019-05-30-welcome.md
    2019-05-30-welcome/index.md
  4. Implement custom logic using DreamFactory API Scripting

    DreamFactory supports four scripting engines: NodeJS, PHP, Python, and V8JS. These engines allow developers to implement custom logic for validating input parameters, transforming API responses to meet specific client requirements, and making calls to other APIs.
  5. Create a blog post in Docusaurus

    To create a blog post in Docusaurus, create a markdown file in the blog/ directory. The filename should follow the date-title format (e.g., YYYY-MM-DD-title.md). Docusaurus automatically generates a page for each post, a blog index page, a tag system, and an RSS feed. The post will be accessible at /blog/[slug] based on the slug defined in the front matter.
    ---
    slug: greetings
    title: Greetings!
    authors:  
      - name: Joel Marcey
        title: Co-creator of Docusaurus 1
        url: https://github.com/JoelMarcey
        image_url: https://github.com/JoelMarcey.png
      - name: Sébastien Lorber
        title: Docusaurus maintainer
        url: https://sebastienlorber.com
        image_url: https://github.com/slorber.png
    tags: [greetings]
    ---
    Congratulations, you have made your first post!
    Feel free to play around and edit this post as much you like.
  6. Create and organize blog posts in Docusaurus

    Docusaurus blogging features are powered by the @docusaurus/plugin-content-blog plugin. To create blog posts, add Markdown files or folders to the blog directory. The plugin automatically extracts the post date from the filename (e.g., 2019-05-30-welcome.md) or from an index.md file within a dated folder (e.g., 2019-05-30-welcome/index.md). Using a folder for a post is recommended for co-locating images with the content. Regular authors can be managed in the authors.yml file, and posts support tags.
  7. Create standalone pages using file-based routing

    Add Markdown or React files to the src/pages directory to automatically create standalone pages. The file path determines the URL route:

    • src/pages/index.js maps to the root /
    • src/pages/foo.md maps to /foo
    • src/pages/foo/bar.js maps to /foo/bar
  8. Set blog post dates using filenames in Docusaurus

    Docusaurus can automatically extract the blog post date from the filename. Supported formats include a date prefix in the filename or a date prefix in the folder name containing an index.md file.
    2019-05-30-welcome.md
    2019-05-30-welcome/index.md
  9. Create a basic document in Docusaurus

    Documents in Docusaurus are created as markdown files within the docs directory. For example, creating a file at docs/hello.md will make a new document available at the URL path /docs/hello.
    # Hello
    This is my **first Docusaurus document**!
  10. Translate a documentation file

    To translate a document, copy the original markdown file from the docs directory into the corresponding locale folder within the i18n directory. The path follows the pattern: i18n/{locale}/docusaurus-plugin-content-docs/current/{filename}.md.
    mkdir -p i18n/fr/docusaurus-plugin-content-docs/current/
    cp docs/intro.md i18n/fr/docusaurus-plugin-content-docs/current/intro.md
  11. Apply configuration changes in DreamFactory

    DreamFactory configuration is managed via the .env file located in the dreamfactory directory. Whenever changes are made to the .env file, the configuration cache must be cleared for the changes to take effect.
    # Run this command in the dreamfactory directory
    php artisan config:clear
  12. Create interactive Docusaurus blog posts using MDX

    Docusaurus blog posts support MDX, allowing you to use React components directly within your markdown content to create interactive elements.
    <button onClick={() => alert('button clicked!')}>
      Click me!
    </button>