This is my portfolio. Built on top of the Auth-Starter-2.0
package.
Starter repo for user authentication using passport, user payment handling using Stripe, and SSR using Next. Component Library AntD
- Change
.env.example
to.env
, and populate all fields - Start database
sudo mongod
(Catalina -- specify config file:sudo mongod --config /usr/local/etc/mongod.conf
) - (OPTIONAL) - start Neo4j database (currently un-used)
- Start Strapi (in different repo)
strapi start
ornpx strapi start
$ npm run dev
passport-facebook
strategy will not return the Users Facebook URL by default. You must use the Facebook Javascript SDK. This repo does not do that.- Instagram authentication doesn't return user email. - Also Instagram authentication is silly and probably shouldnt be done
- All login related routes live under
/c/login
route - This uses both SASS and LESS Preprocessors. LESS is used with AntD Design Language and Components found here
- You have to setup a Google app to send emails using nodemailer from google. Video here
- Importing all AntD CSS styles in the
main.scss
, this is to avoidmini-css-extract-plugin
ordering errors described here - The
CardDetails
component requires passing in{...props}
- Profile is a Class component. Needs
shouldComponentUpdate
to avoid unnecessary re-renders - TODO: find a way to do this with hooks.
Todos are kept in the auth-starter-2.0 repo's issues.
You can also search the code base for TODO:
for small refactors
- Set the HTTP Cookie to Secure
- Check for
Referer
when checking cookie - If you try and login while logged in — go to profile
- Convert into MonoRepo - ie seperate out Server and Client
- Figure out a way to opt in to Automatic Static optimization url
npx create-next-app --example with-redux with-redux-app
# or
yarn create next-app --example with-redux with-redux-app
https://github.com/elsewhencode/project-guidelines#6-structure-and-naming
- Create droplet on Digital Ocean.
- install Dokku on droplet
- Create an app using dokku:
dokku apps:create my-app-name
- Install any plugins you will need (eg Mongo)
a)
sudo dokku plugin:install https://github.com/dokku/dokku-mongo.git
b) Create a databasedokku mongo:create database-name
c) link databasedokku postgres:link rails-database ruby-rails-sample
- Update any environment variables
dokku config:set my-app-name ENV=PRODUCTION ...
- On local machine, add remote repo
git remote add dokku dokku@IP_OF_DROPLET:my-app-name
git push dokku master
(must be master ormy-branch:master
)
- Node and NPM versions are declared in
package.json
, potentially also in.nvmrc
"engines": {
"node": "12.14.1",
"npm": "6.13.4"
}
- All dependencies are met and, if required for compiling or deployment, are in the
dependencies
and notdev dependencies