Next-Skeleton
A simple framework to help get you stared with your Next.js app.
Features
It already has some of the basics baked right in:
- Based on the SSR Caching
create-next-app
example - Material UI
- FontAwesome 5
- Mongoose DB Modeling
- Winston Logging
- OAuth via next-auth
Getting Started
yarn install
to get dependenciesyarn dev
to launch the development serveryarn build
when ready to build for productionyarn start
to launch the production app
Setting up Sign in with Google
Environment Variables:
- GOOGLE_ID
- GOOGLE_SECRET
Configuration Steps:
- Visit Google Cloud Console
- Click the CREATE PROJECT button, enter a Project Name and click CREATE
- Then select APIs then Credentials
- Select Create new oAuth Client ID and enter the following:
- Application Type: Web Application
- Authorized Javascript origins:
http://your-server.example.com/
- Authorized redirect URI:
http://your-server.example.com/auth/oauth/google/callback
- Specify Client ID as the GOOGLE_ID Config Variable
- Specify Client Secret as the GOOGLE_SECRET Config Variable
- Enable Google+ on the project - if you don't, sign in with Google+ will fail!
Available Environment Variable Options
- PORT=3001
- SESSION_SECRET=change-me
- MONGO_URI=mongodb://user:password@localhost:27018/skeleton
- SERVER_URL=https://skeleton.mysite.io
- EMAIL_FROM=next-skeleton@mysite.io