This is the FARM Stack course, where you are going to learn how to build an application from scratch using FASTAPI, React and mongoDB

Overview

FARM-Stack-Course

This is the FARM Stack course, where you are going to learn how to build an application from scratch using FASTAPI, React and mongoDB

FARM stands for FastAPI - React - MongoDB.

WE are going to build our app using FASTAPI for the backend server, React for the frontend client,

and MongoDB for the backend database server, so this is for data persistance.

And in my opinion, FARM stack resembles the MEAN stack or the MERN stack,

the only difference is the FASAPI because React and MongoDB are the same in the three stacks,

in MEAN we use Angular and NodeJs, and in MERN we use React and NodeJs.

FASTAPI is a modern and fast web framework for building APIs, created by Sebastien Ramirez,

it uses ASGI which is the interface between your app and the server and the response time is lightening fast

and this is one of the big advantages of having ASGI server implementaion on your side.

Also, one if its big features that it supports coroutines and concurency without the need to import the ASYNCIO module in Python,

and in a way it's faster than Express which is NodeJs framework ( and Express is E in the MEAN and MERN stacks ).

FASTAPI also has interactive API documentation, so it helps you testing the different HTTP requests like get post,

put and delete visually using Open API which is itself based on JSON schema.

Please follow along in the video to get more details about the course.

Thank you. BR, Bek

You might also like...
Clone Coding Repository for
Clone Coding Repository for "React WebGame" Course of ZeroCho

Clone Coding Repository for "React WebGame" Course of ZeroCho

 Javascript Mastery Course
Javascript Mastery Course

Javascript Mastery Course

JavaScript course at the Udemy platform given by Professor Luiz Otávio Miranda
JavaScript course at the Udemy platform given by Professor Luiz Otávio Miranda

Javascript e TypeScript - front-end e back-end (Full Stack) - Node, Express, noSQL, React, hooks, Redux, Design Patterns Curso de JavaScript na platad

An DEV.to clone created with MongoDB, Express, React, and Socket.io
An DEV.to clone created with MongoDB, Express, React, and Socket.io

DEV.to Clone An DEV.to clone created with MongoDB, Express, React, and Socket.io Live Site Backend API Tech UI: React Routing: React Router Real-time

This Project is a fork of Ethereum Boilerplate and demonstrates how you can build your own NFT Rarity Ranker.
This Project is a fork of Ethereum Boilerplate and demonstrates how you can build your own NFT Rarity Ranker.

This Project is a fork of Ethereum Boilerplate and demonstrates how you can build your own NFT Rarity Ranker.

Description So you want to make a difference in the world. You definitely want to do more than just sign a petition
Description So you want to make a difference in the world. You definitely want to do more than just sign a petition

peticipate Description So you want to make a difference in the world. You definitely want to do more than just sign a petition. You have some awesome

A web application that allows you to create and share wall of gifs! Built on top of solana blockchain.

Wall of gif with Solana A web application that allows you to create and share wall of gifs! Built on top of solana blockchain. Installation and Usage

Gif Portal build using solana, anchor, web3 and react

Features of the dapp View Popular Dance Moves Gifs Vote for your favorite Gifs Add link of your favorite dance gif on the portal All the data includin

Code examples for the blog post titled The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom
Code examples for the blog post titled The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom

The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom Code examples to go with the blog post available here Prereq

Comments
  • CRUD Operations Fail

    CRUD Operations Fail

    Hello, thank you for sharing this! I found this repo through your YouTube tutorial, which was very helpful to get started.

    Currently, when trying any of the database related operations from the FastAPI docs, I always fail with a response code of 500 with an Internal Server Error. Here's the full stack trace:

    RuntimeError: Task <Task pending coro=<RequestResponseCycle.run_asgi() running at /Users/rahulsomani/miniconda3/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py:376> cb=[set.discard()]> got Future <Future pending cb=[_chain_future.<locals>._call_check_cancel() at /Users/rahulsomani/miniconda3/lib/python3.7/asyncio/futures.py:351]> attached to a different loop
    

    I was able to resolve the issue following the advice in this StackOverflow post.

    I changed database.py as follows:

    from motor.motor_asyncio import AsyncIOMotorClient, AsyncIOMotorDatabase
    
    DB_URL = "mongodb://127.0.0.1:27017/"
    
    db: AsyncIOMotorDatabase = None
    
    
    async def get_db_client() -> AsyncIOMotorClient:
        client = AsyncIOMotorClient(DB_URL)
        return client
    
    
    async def get_db(name="TodoList") -> AsyncIOMotorDatabase:
        db = await get_db_client()
        return db[name]
    

    Then load the db on startup in main.py:

    ...
    
    app = FastAPI()
    app.add_event_handler("startup", get_db)
    

    And had to add a line to all the functions inside database.py like so:

    async def remove_todo(id: int):
        db = await get_db()
        await db["todo"].delete_one({"id": id})
        return True
    
    async def create_todo(todo):
        doc = todo
        db = await get_db()
        res = await db["todo"].insert_one(doc)
        return doc
    
    
    ...  # and so on
    

    Is this the correct way to do things? I'm new to writing code with async and await, and was wondering if calling db = await get_db() inside all the functions that fetch / modify from the databse is inefficient?

    Thanks!

    opened by rsomani95 1
Owner
Bek Brace
Retro gamer and Coffee breaker! | I teach programming on YouTube. Mainly Python | Share my tech opinions on DEV.TO | LA Lakers are the best!
Bek Brace
Build react 18 + SSR from scratch 💪

After React v18 is published, I think it's time to build React app with server-side rendering (SSR) once with those new APIs. Before that, I always use Next.js when it comes to SSR.

Hong-Kuan Wu 83 Dec 6, 2022
A complete application from scratch using Node.js, React, and Tailwind

A complete application from scratch using Node.js, React, and Tailwind

Fernando Bade 1 May 6, 2022
ReactJS-Spring-Boot-CRUD-Full-Stack-App - Course on YouTube

ReactJS-Spring-Boot-CRUD-Full-Stack-App - Course on YouTube

Nicole Bidigaray 4 Sep 30, 2022
Here is the place try to learn to call API using React.js with anything your code style and contribute to open-source. Part of Hacktoberfest

Table of Contents About The Project Built With Getting Started Prerequisites Installation Usage About The Project To welcome hacktoberfest we provide

Abdul Hakim 13 Oct 30, 2022
⚛️ Deliver UI for Web and Mobile platforms without taking care about complexity on how to style there, learn React once and code everywhere

SkynexUI Use the platform, don't care about how to style there ⚠️ Version 1.x.x is alpha, trust only in v2 A set of components writen on top of React

SkynexUI 671 Dec 31, 2022
React, Node (Express) & MongoDB Application.

social-meta React, Node (Express) & MongoDB Application. Getting Started This repository aims to assist you in beginning work on a MERN stack applicat

Asad Anik 1 Jan 5, 2022
A curated list of resources to learn React and related web technologies as fast as possible.

React Learning Resources A curated list of resources to learn React and related web technologies as fast as possible. The goal is to help you create p

Naresh Bhatia 61 Dec 31, 2022
30 Days of React challenge is a step by step guide to learn React in 30 days

30 Days of React challenge is a step by step guide to learn React in 30 days. It requires HTML, CSS, and JavaScript knowledge. You should be comfortable with JavaScript before you start to React. If you are not comfortable with JavaScript check out 30DaysOfJavaScript. This is a continuation of 30 Days Of JS. This challenge may take up to 100 days, follow your own pace.

Asabeneh 18.4k Jan 5, 2023
Learn how to use the Web3Button component from the thirdweb React SDK!

Web3Button This template shows you how you can use our Web3Button component from our React SDK to call any function on any smart contract; and ensure

thirdweb templates 12 Dec 14, 2022
The LinkedIn Learning course React.js: Building an Interface

React.js: Building an Interface This is the repository for the LinkedIn Learning course React.js: Building an Interface. The full course is available

MOHAMMED KHORMI 1 Oct 14, 2021