Base project to start coding a Next Js App with Materiail UI and Firebase - Using Typescript
-public ~ Images and others assets
-src
---components ~ Components for app
---pages ~ Sreens for APP
-----api ~ API next js
---services ~ Services like firebase
When importing you can use @components/
to refer to src/components/*
this is to avoid the path hell ../../../components
.
Another Path Alias configurated:
@pages/
@services/
Edith the file tsconfig.json
to add more paths alias.
- Download the project
- Change the project name in package.json
- Configurate Firebase
.env
file - Install and Run the development server:
yarn install
yarn dev
- Open http://localhost:3000 with your browser to see the result.
Edit the file .env
with your Firebase JS SDK configuration.
NEXT_PUBLIC_FIREBASE_CONFIG="" // Json Formatt
In the route src/services/firebase.js
you can find the firebase initialize app method.
Take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.