Coder Social home page Coder Social logo

shiyinq / fasmo Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 575 KB

๐Ÿš€ My starter project for the FASMO Stack, utilizing FastAPI, Svelte, and MongoDB to build a modern web application.

License: The Unlicense

Dockerfile 0.84% JavaScript 0.75% CSS 1.05% HTML 0.19% Svelte 10.07% TypeScript 76.11% Shell 0.40% Python 10.59%
fastapi mongodb starter-project svelte sveltekit public-template python typescript

fasmo's Introduction

FASMO

            ('-.      .-')   _   .-')                
           ( OO ).-. ( OO ).( '.( OO )_              
   ,------./ . --. /(_)---\_),--.   ,--.).-'),-----. 
('-| _.---'| \-.  \ /    _ | |   `.'   |( OO'  .-.  '
(OO|(_\  .-'-'  |  |\  :` `. |         |/   |  | |  |
/  |  '--.\| |_.'  | '..`''.)|  |'.'|  |\_) |  |\|  |
\_)|  .--' |  .-.  |.-._)   \|  |   |  |  \ |  | |  |
  \|  |_)  |  | |  |\       /|  |   |  |   `'  '-'  '
   `--'    `--' `--' `-----' `--'   `--'     `-----' 

FASMO - FastAPI SvelteKit MongoDB

The project structure for the backend is inspired by this repository.

The frontend of the project is built using SvelteKit, initialized with the command:
npm create svelte@latest fasmo

Table of Contents

Development

Backend

1. Create a Virtual Environment (venv)

Create a virtual environment (venv) using conda with the following command:

conda create -n [venv-name] python=3.10

Activate the venv with the following command:

conda activate [venv-name]

2. Install requirements

Install the required dependencies with the following command:

pip install -r requirements/dev.txt

3. Create the .env File

Create and update .env file based on .env.example

cp .env.example .env

4. Run the backend

Run the server with the following command:

sh script/start-dev.sh

5. Open the API Documentation

The API documentation can be opened in a browser at the following address:

http://localhost:8000/docs

Frontend

1. Go to frontend folder

Go to frontend folder and install dependencies:

cd frontend
npm install

2. Create the .env File

Create and update .env file based on .env.example

cp .env.example .env

3. Run the frontend

Run development server

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Formatting

To make the code cleaner and more structured

Backend:

sh scripts/lint-fromat.sh

Frontend:

npm run lint
npm run format

Deployment

Before you begin, ensure you have Docker installed.

1. Create environment files

For the backend:

cp .env.example .env

For the frontend:

cd frontend
cp .env.example .env
cd ..

Open each .env file you have created and update the values as needed.

2. Build and run the Docker containers

docker compose up --build -d

Wait a few minutes for the setup to complete. You can then access:

fasmo's People

Contributors

shiyinq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.