Comments (9)
Got it, just read your message about main, I'll go ahead and merge to main. While I work, I'll be pushing updates every hour or so.
from fastapi-soft-ui-dashboard.
- So, my overwhelming concern is the mixing of backend and frontend. In my experience, generally the frontend and backend share the same codebase but are hosted on different servers. Indeed, fastapi isn't optimized to serve up templates. For the frontend, if you wanted to keep using python, I would recommend using python FLASK. So the structure would look a little bit like this:
--backend/
--server/
--models/ schemas etc (everything needed for the backend)
I didn't write out exactly what would be stored in each folder, as you've outlined it above.
- Also, I noticed that there is a scripts folder where sql scripts are going to be stored. I've never really seen raw sql being using with python, most people will go with SQLAlchemy. For the sake of security (sql injection), and just in general scalability, I would recommend we use SQLAlchemy. If you're going to use those scripts to manage the database, I would recommend a module called Alembic.
from fastapi-soft-ui-dashboard.
Hello @barreraalexander
We need a full FastAPI solution, without mixing Flask in the codebase.
This product should be a simple monorepo powered by FA.
Just for reference, please take a look at this Flask project used already in production:
https://github.com/app-generator/flask-material-kit
Is just a simple codebase that handles the UI using an MVC pattern, without an API node.
Basically, the current project should be closer to this pattern (no API / UI split).
Also, being the first iteration, without feedback from users, is a must to keep things ar minimum.
Let me know your thoughts @barreraalexander.
Ty
from fastapi-soft-ui-dashboard.
Absolutely understood! We are going to have front and back served by one server, separated into neat routes as you've outlined above. And then my last question is about mysql and the scripts folder you've created above. Are we going to be writing raw sql or are we going to utilize an ORM like SQLAlchemy? In the case that we use an ORM to interact with the database, we won't be needing a scripts folder, I don't believe.
I believe lastly, I'd like to go over authentication. We're going to be authenticating using third-party clients like google or twitter? Or are we going to be authenticating on the server, using OAuth and bearers tokens?
from fastapi-soft-ui-dashboard.
Hello @barreraalexander,
The DB layer should have ORM and Migration library.
The authentication should be provided in two flavors:
- classic user/pass/email combination (please check the UI for the Flask version)
- Social authentication for
Github
&Twitter
In the next iteration, an authorization/user roles layer might be added.
Let's select now the system that will support better this evolution (3rd party tools OR OAuth + bearer tokens).
Let me know your thoughts on this.
Ty @barreraalexander
from fastapi-soft-ui-dashboard.
Perfect! For the ORM I'll use SQLAlchemy, for the Migration library, I'll use alembic.
As for the classic user authentication, if we're going to use user/email/pass, we're going to be storing user credentials in the database, yes? As in, I'm going to create another table/model? I'm happy to do it, I just want to make sure we're on the same page :)
If we're looking for a tool to get started quickly and is easy adapt, I would say let's get started with the classic OAuth + bearer token style.
I've created a second branch in the git. I'm going to build out the basic tree you've outlined, and be on hold for some of the specifics I've asked above :)
from fastapi-soft-ui-dashboard.
Hello @barreraalexander
- yes, all good saving credentials in DB
- Let's go with OAuth + Bearer Token
Being under development, feel free to commit on the head.
Once we have a stable version, we can use branches for all future sprints.
Ty @barreraalexander for your efforts.
from fastapi-soft-ui-dashboard.
P.S. When you have some free time, please update the codebase structure. Ty!
🚀🚀
from fastapi-soft-ui-dashboard.
Validated. Closing.
Ty @barreraalexander
from fastapi-soft-ui-dashboard.
Related Issues (9)
- Project Status & Quality Check HOT 2
- Docker Execution - The default target HOT 1
- Logout link - unavailable
- SignIN - Username label in the UI, but Email expected by the backend
- Dahboard Page - Shows broken images and no charts
- Sidebar Links are broken
- Sign IN - Random user HOT 2
- SQLite DB - Initial Creation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastapi-soft-ui-dashboard.