Skip to content

Commit

Permalink
feat(mail): add user email verification
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Apr 30, 2024
1 parent bd86a69 commit d85ffc3
Show file tree
Hide file tree
Showing 20 changed files with 732 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ DB_DATABASE=athenna

JWT_SECRET=I62hxxdSwWnNqEw
JWT_EXPIRATION=1h

MAIL_MAILER=smtp
MAIL_HOST=localhost
MAIL_PORT=5025
MAIL_USERNAME=
MAIL_PASSWORD=
6 changes: 6 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ DB_DATABASE=athenna

JWT_SECRET=I62hxxdSwWnNqEw
JWT_EXPIRATION=1h

MAIL_MAILER=smtp
MAIL_HOST=localhost
MAIL_PORT=5025
MAIL_USERNAME=
MAIL_PASSWORD=
74 changes: 71 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@athenna/http": "^4.32.0",
"@athenna/ioc": "^4.19.0",
"@athenna/logger": "^4.20.0",
"@athenna/mail": "^4.18.0",
"@athenna/view": "^4.21.0",
"@fastify/cors": "^8.5.0",
"@fastify/helmet": "^11.1.1",
Expand Down Expand Up @@ -141,7 +142,11 @@
"@athenna/core/providers/CoreProvider",
"@athenna/http/providers/HttpRouteProvider",
"@athenna/http/providers/HttpServerProvider",
"@athenna/database/providers/DatabaseProvider"
"@athenna/database/providers/DatabaseProvider",
"@athenna/view/providers/ViewProvider",
"@athenna/mail/providers/MailProvider",
"@athenna/mail/providers/SmtpServerProvider",
"@athenna/view/providers/ViewProvider"
],
"controllers": [
"#src/controllers/user.controller",
Expand Down Expand Up @@ -211,7 +216,8 @@
"migration:revert": {
"path": "@athenna/database/commands/MigrationRevertCommand",
"loadApp": true
}
},
"make:view": "@athenna/view/commands/MakeViewCommand"
},
"templates": {
"exception": "node_modules/@athenna/core/templates/exception.edge",
Expand All @@ -229,7 +235,8 @@
"terminator": "node_modules/@athenna/http/templates/terminator.edge",
"model": "node_modules/@athenna/database/templates/model.edge",
"seeder": "node_modules/@athenna/database/templates/seeder.edge",
"migration": "node_modules/@athenna/database/templates/migration.edge"
"migration": "node_modules/@athenna/database/templates/migration.edge",
"view": "node_modules/@athenna/view/templates/view.edge"
},
"directories": {
"bootstrap": "bin",
Expand Down
90 changes: 90 additions & 0 deletions src/config/app.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,100 @@
export default {
/*
|--------------------------------------------------------------------------
| Default environment
|--------------------------------------------------------------------------
|
| Default environment of the application.
|
*/

environment: process.env.APP_ENV || 'production',

/*
|--------------------------------------------------------------------------
| Application debug
|--------------------------------------------------------------------------
|
| Set if the application will start in debug mode or not. If in debug mode,
| the application will show sensitive logs and return sensitive data on errors.
|
*/

debug: Env('APP_DEBUG', true),

/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application and can used when you
| need to place the application's name in a email, view or
| other location.
|
*/

name: Env('APP_NAME', '@athenna/athenna'),

/*
|--------------------------------------------------------------------------
| Application Version
|--------------------------------------------------------------------------
|
| This value is the version of your application and can used when you
| need to place the application's version in a route, view or
| other location.
|
*/

version: Env('APP_VERSION', '1.0.0'),

/*
|--------------------------------------------------------------------------
| Application Description
|--------------------------------------------------------------------------
|
| This value is the description of your application and can used when you
| need to place the application's description in swagger, view or
| other location.
|
*/

description: Env('APP_DESCRIPTION', 'Athenna is awesome!'),

/*
|--------------------------------------------------------------------------
| Application source url
|--------------------------------------------------------------------------
|
| This value is the application source url, usually a link to a git repo-
| sitory.
|
*/

source: Env('APP_SOURCE', 'https://github.com/AthennaIO'),

/*
|--------------------------------------------------------------------------
| Documentation url
|--------------------------------------------------------------------------
|
| This value is the application documentation url, usually a link to the
| main documentation of the API.
|
*/

documentation: Env('APP_DOCUMENTATION', 'http://localhost:3000/docs'),

/*
|--------------------------------------------------------------------------
| Default Locale
|--------------------------------------------------------------------------
|
| Default locale to be used by Intl provider. You can always switch drivers
| in runtime or use the official Intl middleware to detect the driver
| based on HTTP headers/query string.
|
*/

locale: Env('APP_LOCALE', 'en')
}
Loading

0 comments on commit d85ffc3

Please sign in to comment.