Typhoon v2
Opened this issue · 0 comments
Ayc0 commented
Goal:
- Create API that users can use:
const { createApp } = require('@typhoon/core');
const { listen, authRoutes, passport, URIs, AUTHENTICATION_ENDPOINT } = createApp({
url: "my.typhoon.co",
secretEnvSalt: "salt",
portainer?: {
adminPassword: 'password',
// every field here will be passed to the docker run command
// https://portainer.readthedocs.io/en/stable/configuration.html
logo: "path to logo",
l: ['owner=acme', 'service=secret'],
}
})
// Add Twitter OAuth http://www.passportjs.org/docs/twitter/
passport.use(new TwitterStrategy({ ... }, ...);
// Redirect the user to Twitter for authentication.
// When complete, Twitter will redirect the user back to the application at
// /AUTHENTICATION_ENDPOINT/twitter/callback
authRoutes.get(`${AUTHENTICATION_ENDPOINT}/twitter`, passport.authenticate('twitter'));
// Twitter will redirect the user to this URL after approval.
// Finish the authentication process by attempting to obtain an access token.
// If access was granted, the user will be logged in.
// Otherwise, authentication has failed.
authRoutes.get(
`${AUTHENTICATION_ENDPOINT}/twitter/callback`,
passport.authenticate('twitter', {
successRedirect: URIs.home,
failureRedirect: URIs.login,
})
);
listen();
- Auto deploy frontend and docker
- Same as typhoon v1
- Store password encrypted
Backend:
- Use typescript
- Apollo for API with websocket
- Passport for authent (passportjs.org)
- MongoDB + mongoose DB
- dockerode for docker's management
- Nodegit for git's management
Frontend :
- React with Create-React-App v3 and typescript
- React-apollo with hooks and websocket