-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: integrate the frontend inside astro
- Loading branch information
1 parent
4da1d03
commit 544b116
Showing
60 changed files
with
5,551 additions
and
3,781 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
API_URL=http://localhost:4000 | ||
APPLE_MUSIC_PRIVATE_KEY= | ||
APP_URL=http://localhost:5173 | ||
APP_URL=http://localhost:4321 | ||
DATABASE_URL=postgres://admin:swapifypassword@localhost:54321/swapify_test | ||
JWT_SECRET= | ||
PLATFORM_HOST=localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ defmodule SwapifyApi.Emails do | |
|
||
require EEx | ||
|
||
alias SwapifyApi.Utils | ||
|
||
@no_reply_sender {"Swapify - Notifications", "[email protected]"} | ||
|
||
EEx.function_from_file( | ||
|
@@ -16,7 +18,7 @@ defmodule SwapifyApi.Emails do | |
) | ||
|
||
def welcome(email, name, options \\ []) do | ||
app_url = Keyword.get(options, :app_url) | ||
app_url = Utils.get_app_url() | ||
username = Keyword.get(options, :username) | ||
{:ok, template} = welcome_template(username, app_url) |> Mjml.to_html() | ||
|
||
|
@@ -44,7 +46,7 @@ defmodule SwapifyApi.Emails do | |
) | ||
|
||
def transfer_ready(email, name, options \\ []) do | ||
app_url = Keyword.get(options, :app_url) | ||
app_url = Utils.get_app_url() | ||
username = Keyword.get(options, :username) | ||
source_name = Keyword.get(options, :source_name) | ||
destination_name = Keyword.get(options, :destination_name) | ||
|
@@ -84,7 +86,7 @@ defmodule SwapifyApi.Emails do | |
) | ||
|
||
def transfer_error(email, name, options \\ []) do | ||
app_url = Keyword.get(options, :app_url) | ||
app_url = Utils.get_app_url() | ||
username = Keyword.get(options, :username) | ||
source_name = Keyword.get(options, :source_name) | ||
destination_name = Keyword.get(options, :destination_name) | ||
|
@@ -115,7 +117,7 @@ defmodule SwapifyApi.Emails do | |
) | ||
|
||
def transfer_done(email, name, options \\ []) do | ||
app_url = Keyword.get(options, :app_url) | ||
app_url = Utils.get_app_url() | ||
username = Keyword.get(options, :username) | ||
source_name = Keyword.get(options, :source_name) | ||
destination_name = Keyword.get(options, :destination_name) | ||
|
@@ -144,10 +146,8 @@ defmodule SwapifyApi.Emails do | |
) | ||
|
||
def password_reset_request(email, name, opts \\ []) do | ||
app_url = Utils.get_app_url() | ||
code = Keyword.get(opts, :code) | ||
|
||
app_url = Application.fetch_env!(:swapify_api, :app_url) | ||
|
||
reset_url = app_url <> "/password-reset/#{code}" | ||
|
||
{:ok, template} = | ||
|
@@ -174,7 +174,7 @@ defmodule SwapifyApi.Emails do | |
) | ||
|
||
def welcome_beta(email, name) do | ||
app_url = Application.fetch_env!(:swapify_api, :app_url) | ||
app_url = Utils.get_app_url() | ||
|
||
{:ok, template} = | ||
welcome_beta_template(name, app_url) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
VITE_API_URL=http://localhost:4000 | ||
VITE_APP_URL=http://localhost:3000 | ||
VITE_HIGHLIGHT_APP_ID= | ||
PUBLIC_API_URL=http://localhost:4000 | ||
PUBLIC_APP_URL=http://localhost:3000 | ||
PUBLIC_HIGHLIGHT_APP_ID= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,35 @@ | ||
|
||
# build output | ||
dist/ | ||
dist | ||
.solid | ||
.output | ||
.vercel | ||
.netlify | ||
.vinxi | ||
|
||
# Environment | ||
.env | ||
.env*.local | ||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
/node_modules | ||
node_modules/ | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
*.launch | ||
.settings/ | ||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# Temp | ||
gitignore | ||
|
||
# System Files | ||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# jetbrains setting folder | ||
.idea/ | ||
|
||
## Panda | ||
styled-system | ||
styled-system-studio | ||
styled-system-studio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"plugins": ["prettier-plugin-astro"], | ||
"semi": true, | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// @ts-no-check | ||
import { defineConfig } from "astro/config"; | ||
import svgr from "vite-plugin-svgr"; | ||
import tsconfigPaths from "vite-tsconfig-paths"; | ||
|
||
import react from "@astrojs/react"; | ||
|
||
import node from "@astrojs/node"; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
output: "server", | ||
integrations: [react()], | ||
|
||
vite: { | ||
build: { | ||
sourcemap: true, | ||
}, | ||
plugins: [ | ||
tsconfigPaths(), | ||
svgr({ | ||
svgrOptions: { | ||
exportType: "default", | ||
}, | ||
}), | ||
], | ||
}, | ||
|
||
adapter: node({ | ||
mode: "standalone", | ||
}), | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.