Deno Devs is a reverse job board for developers looking to work with Deno.
You may install these manually or with tea developer environment setup if desired.
These require manual setup (but are optional):
-
Clone the repo:
git clone https://github.com/kevingorski/denodevs.com.git cd denodevs
-
Create a
.env
file to store environmental variables:cp .example.env .env
-
Register a new GitHub OAuth application with the following values:
Application name
= a name of your own choosingHomepage URL
=http://localhost:8000
Authorization callback URL
=http://localhost:8000/callback
-
Once registered, copy the
Client ID
value to theGITHUB_CLIENT_ID
value in your.env
file. -
Click
Generate a new client secret
and copy the resulting client secret to theGITHUB_CLIENT_SECRET
environment variable in your.env
file.
- Create a Google account if you don't already have one.
- Accept the T&C for your account on Google Cloud Console.
- Go to "APIs & Services"
- Create a project for Deno Devs development
- With that project selected, create an OAuth consent screen with the following
settings:
External
(notInternal
)- App name
Deno Devs
- User support email: select any email associated with your account
- Authorized domains:
localhost
by default for dev - Developer contact information: any email address you'd like
- OAuth scopes:
openid
./auth/userinfo.email
./auth/userinfo.profile
- Test users
- Add any email addresses you'd like to use for testing (up to 100)
- Under "Credentials," "+ Create Credentials," "OAuth Cliend ID"
- Application type
Web application
- Name
Deno Devs
- Authorized JavaScript origins
http://localhost
(or however you're hostiing dev) - Authorized redirect URIs
http://localhost/googleCallback
https://developers.google.com/oauthplayground
if you'd like to use the OAuth 2.0 Playground to test that everything is working (optional)
- Set the
GOOGLE_CLIENT_ID
andGOOGLE_CLIENT_SECRET
in your.env
file
- Application type
- Go to "Enabled APIs & Services," click "+ Enable Apis and Services"
- Search for "people" to find the "Google People API", click on it
- Click "Enable"
By default emails will be sent to the console rather than sent via
Resend. If you have a Resend API key, that can be set at
RESEND_API_KEY
, but you'll still need to turn off SEND_EMAIL_TO_CONSOLE
(=false
).
You can also test changes to emails via the Admin area (explained in the next section).
In order to access the Admin area, you'll need to either use the default passwords or update them.
Caution: By default local development traffic is not secured and these values are sent via basic auth, so do not use anything you wouldn't want public (because it essentially is).
ADMIN_PASSWORD=xxx
ADMIN_USERNAME=xxx
If you do set up a local SSL certficate, the following environment values will need to be updated:
SITE_BASE_URL=https://localhost:8000
USE_SECURE_COOKIES=true
Note: Stripe is only enabled if the
STRIPE_SECRET_KEY
environment variable is set.
- Copy your Stripe secret key as
STRIPE_SECRET_KEY
into your.env
file. We recommend using the test key for your development environment. - Run
deno task init:stripe
and follow the instructions. This automatically creates your "Premium tier" product and configures the Stripe customer portal.Note: go to tools/init_stripe.ts if you'd like to learn more about how the
init:stripe
task works. - Listen locally to Stripe events:
stripe listen --forward-to localhost:8000/api/stripe-webhooks --events=customer.subscription.created,customer.subscription.deleted
- Copy the webhook signing secret to .env as
STRIPE_WEBHOOK_SECRET
.
Note: You can use Stripe's test credit cards to make test payments while in Stripe's test mode.
Finally, start the server by running:
deno task start
Go to http://localhost:8000 to begin playing with your new SaaS app.
TODO: This currently doesn't work
deno task db:seed
To see all the values in your local Deno KV database, run
deno task db:dump
And all kv pairs will be logged to stdout
To reset your Deno KV database, run
deno task db:reset
Since this operation is not recoverable, you will be prompted to confirm deletion before proceeding.
To come...
Before submitting, run the following to check the formatting, linting, and types and run tests in one hit:
deno task ok
To come...