A quickstart tool for creating a FastAPI project with a NextJS frontend.
Project description
Create API App Quickstart Tool
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:
-
Backend
-
Frontend
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
-
Firstly, install Docker, we use this to create the frontend files dynamically using the Build NextJS App Tool.
-
Install the package through
PIP
:pip install create_api_app
-
Create a project:
create-api-app <project_name>
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
-
Open a terminal and navigate to the
backend
directory:cd backend
-
Install a virtual environment for
Poetry
:python -m venv env
-
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.
-
Run the
uvicorn
server using thePoetry
script:app-start
Running the Frontend
-
Open a terminal and navigate to the
frontend
directory:cd frontend
-
Install the packages using Node.js:
npm install
-
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
Built Distribution
Hashes for create_api_app-2.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 790431b67f4d065b93cc4bf8da59bf1c3be4b55e03dd7da004ced91a025bb42a |
|
MD5 | 5f8f37b3c7293c648fab7b5781881ed5 |
|
BLAKE2b-256 | 9440651bacd62ac73d4d81f7f51955c07e2ffa188a0731e409d0724f72de2e7e |