For this project Flask and Next JS is combined to build a full stack web app. Next Js build is used to generate the staic files required for flask app
Contains the following features
- Next JS web app - Authentication UI - Tailwind | Typescript | React Hook Form
- Flask MongoDb integration
- Flask User Authentication - Login / Signup / Forgot Password
- Login with Google
- Login with Github
- Session
- Protected Pages
- Image Compressor | Protected
-- app ( Flask APP ) -- frontend ( Next JS APP) -- venv ( Virtual Enviroment for Python) -- transfer.py ( Used to transfer next js build to flask app)
- Activate the venv -->
. venv/etc/activate
- Open the app folder -->
cd app
- Run the flask app -->
flask --debug run --port=5001 --host=0.0.0.0
- Switch to frontend folder -->
cd frontend
- Run the next js app -->
npm run dev
to build usenpm run build
Note : It creates a templates
folder inside the next js app
Once build is ready swich to main directory and run tranfer.py
this will transfer the templates
folder to flask and static files inside the templates
folders is moved to flasks static folder /_next/static