Skip to main content

A quickstart tool for creating a FastAPI project with a NextJS frontend.

Project description

Create API App Quickstart Tool

PyPI - Python Version

Welcome to the quickstart tool for creating a FastAPI project with a NextJS frontend.

This tool creates a predefined template while installing the most recent packages where possible.

Found on:

Contents

Why This Tool?

Creating a project from scratch can be a tedious process. Not only do you have to create all the files yourself, it typically requires a lot of small minor changes that can easily be automated. So, rather than wasting a lot of time setting up projects, I created a tool that does it all for me!

I use this tool personally for SaaS and ML API projects and have found it extremely useful for immediately diving into coding without faffing around with setup details (except for configuring API keys). Hopefully, it's useful to you too!

The Stack

All projects are created using the same stack, consisting of the following:

  1. Backend

  2. Frontend

    a. Core:

    b. Optional:

Note: all libraries and packages are automatically installed to their latest versions when running the tool.

We've also added some extra files too! You can find out more about them in our documentation.

Installation

  1. Firstly, install Docker, we use this to create the frontend files dynamically using the Build NextJS App Tool.

  2. Install the package through PIP:

    pip install create_api_app
    
  3. Create a project with a name and an optional string of exclusion characters for the optional packages.

    Exclusion options: c, u, s, cs, cu, us, cus. c = Clerk, u = Uploadthing, s = Stripe

    create-api-app <project_name> <exclusions>
    

And that's it! You'll find two folders in your project, one called frontend (for NextJS) and another called backend (for FastAPI).

Running The Backend

  1. Open a terminal and navigate to the backend directory:

    cd backend
    
  2. Install a virtual environment for Poetry:

    python -m venv env
    
  3. Access it using one of the following (first -> Windows; second -> Mac/Linux):

    .\env\Scripts\activate
    
    source ./env/bin/activate
    

    Not working? Refer to the virtual env docs.

  4. Run the uvicorn server using the Poetry script:

    app-start
    

Running the Frontend

  1. Open a terminal and navigate to the frontend directory:

    cd frontend
    
  2. Install the packages using Node.js:

    npm install
    
  3. Run the development server:

    npm run dev
    

Customization

Customization options are found in our documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

create_api_app-2.1.2.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

create_api_app-2.1.2-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file create_api_app-2.1.2.tar.gz.

File metadata

  • Download URL: create_api_app-2.1.2.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.0 Windows/10

File hashes

Hashes for create_api_app-2.1.2.tar.gz
Algorithm Hash digest
SHA256 6571d09085e08233168390e21e16212f4102db82b3c1e11f8e23688085e2df8b
MD5 5dd9d0befa8656765a32b7b0f4c617aa
BLAKE2b-256 f4210b3dbab15bc63719c521a8264fc92aa21a28512d6a57b8338150edba4b09

See more details on using hashes here.

File details

Details for the file create_api_app-2.1.2-py3-none-any.whl.

File metadata

  • Download URL: create_api_app-2.1.2-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.0 Windows/10

File hashes

Hashes for create_api_app-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b88d012c5d8b2ba3c53f2278f72a3b5a03e71e794b5c963c658e4aae0663dcba
MD5 2017c56910aaa217b766108f1b6706d3
BLAKE2b-256 43166aa4149f520d7350200b630e34c7fa52d27f9a5f32981e1185b6c47ff418

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page