Skip to content

Commit

Permalink
Refactor (#278)
Browse files Browse the repository at this point in the history
* docker, nuxt, basic config

* src folder, tailwind, fix hot reload, favicon, logo

* i18n, icons, router, bg, home, legal (wip)

* fix header responsive, refactor markdown legal

* fix privacy i18n

* tailwind forms, zod, error page, login (wip)

* login close button, fix home i18n

* register and login (wip)

* fix layout, fix header z-index

* title and description

* fix nav and legal menu responsive

* defineRouteRules, vercel

* remove temp workflows

* workflows

* vercel.json

* postbuild

* vercel

* vercel

* rm workflows

* chore: fix indentation in tsconfig.json

* fix dependences

* fix i18n

* vercel workflows

* reset password layout

* vercel.json

* chore: Update i18n configuration and add language selection in Footer.vue

* devtools .env
  • Loading branch information
AstroCorp authored Jun 13, 2024
1 parent 5b42291 commit c5fd91b
Show file tree
Hide file tree
Showing 132 changed files with 8,017 additions and 13,030 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = tab
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NODE_ENV=development
NODE_PORT=3000

BACKEND_URL=http://localhost:8080
9 changes: 0 additions & 9 deletions .github/dependabot.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/ci.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches-ignore:
- master
jobs:
Deploy-Preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Vercel Production Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches:
- master
jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
40 changes: 21 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# dependencies
/node_modules
/.pnp
.pnp.js
# Node dependencies
node_modules

# testing
/coverage
# Logs
logs
*.log

# production
/build

# misc
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.fleet
.idea

# Local env files
.env
.env.*
!.env.example

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.eslintcache
.vercel
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# Ace Books Frontend
> Frontend de Ace Books. Una web que permite tener una biblioteca de archivos PDF, permitiendo ordenar, buscar y leer tus documentos.


## Comandos:
> yarn run < comando >

### Opciones:
- **start:** Inicia el modo desarrollo en el puerto 3000
- **test:** Ejecutar [tests](https://facebook.github.io/create-react-app/docs/running-tests)
- **build:** Compila para [producción](https://facebook.github.io/create-react-app/docs/deployment)
- **clean:** Elimina dist, node_modules y yarn.lock, limpia la caché de yarn y ejecuta yarn install
Repositorio del frontend de Ace Books, desarrollado con Nuxt.
11 changes: 0 additions & 11 deletions craco.config.js

This file was deleted.

33 changes: 33 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
services:
app:
build:
context: .
dockerfile: ./docker/app/Dockerfile
ports:
- "3000:3000"
env_file:
- .env
volumes:
- .:/app
- node_modules_data:/app/node_modules
networks:
- main

nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- app
networks:
- main

networks:
main:
driver: bridge

volumes:
node_modules_data:
driver: "local"
17 changes: 17 additions & 0 deletions docker/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:20-alpine3.18

RUN apk add --no-cache curl && \
apk add --no-cache nano && \
curl -o- -L https://yarnpkg.com/install.sh | sh

ENV PATH /root/.yarn/bin:$PATH

WORKDIR /app

COPY . .

RUN yarn install

EXPOSE 3000

CMD ["yarn", "dev"]
24 changes: 24 additions & 0 deletions docker/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
worker_processes auto;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

server {
listen 80;
server_name localhost;

location / {
proxy_pass http://app:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
}
51 changes: 51 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
srcDir: 'src/',
css: ['~/assets/css/main.css'],
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
devtools: {
enabled: import.meta.env.NODE_ENV === "development",
},
experimental: {
inlineRouteRules: true,
},
app: {
head: {
link: [{ rel: 'icon', type: 'image/png', href: '/favicon.png' }],
},
},
vite: {
server: {
watch: {
usePolling: true,
interval: 100,
},
},
},
modules: ["nuxt-icons", "@nuxtjs/i18n", "@nuxtjs/mdc", "@nuxt/image"],
i18n: {
vueI18n: './src/i18n/i18n.config.ts',
locales: [
{
code: 'en',
name: 'English',
},
{
code: 'es',
name: 'Español',
},
],
defaultLocale: 'en',
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'language',
redirectOn: 'root',
alwaysRedirect: true,
},
},
});
Loading

0 comments on commit c5fd91b

Please sign in to comment.