Requisitos:
- git
- Instale o chocolatey e o Node.js
Abra o powershell e digite os seguinte comandos para instalar o chocolatey e o Node.js:
powershell -c "irm https://community.chocolatey.org/install.ps1|iex"choco install nodejs-lts --version="22"- Instale o Python3
winget install -e --id Python.Python.3.12- Instale o PostgreSQL
winget install -e --id PostgreSQL.PostgreSQL- Clone o repositório
git clone https://github.com/jojimaaa/pcs3643-login- Entre no repositório
cd pcs3643-login- Entrar no repositório do frontend
cd frontend-login- Instalar as dependências
npm install- Rodar o projeto
npm run build
npm run start- Acesse o site Entre em localhost:3000 para acessar o site.
- Entre no diretório backend-login
cd pcs3643-login/backend-login- Permitir ativação de venv
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force- Criar e ativar venv
py -m venv .venv
.\.venv\Scripts\Activate.ps1- Atualizar pip da venv
py -m pip install --upgrade pip- Instalar dependências do backend
py -m pip install fastapi "uvicorn[standard]" sqlmodel "psycopg[binary]" alembic python-dotenv "python-jose[cryptography]" "passlib[bcrypt]" pydantic[email] python-multipart watchfiles- Definir variáveis de ambiente
$env:JWT_KEY = "pcs3643_jwtkey_123456789_abcdefg"
$env:DATABASE_URL = "postgresql+psycopg://postgres:postgres@localhost:5432/pcs3643"- Criar banco de dados
psql -U postgres -h localhost -c "CREATE DATABASE pcs3643;"- Rodar backend
py -m uvicorn app.main:app --reload --port 8000