A full-stack web application for creating and managing decks of cards. This project consists of two main components: the backend and the frontend.
The backend is built with Node.js and Express.js, using Sequelize as an ORM for the PostgreSQL database. It provides RESTful APIs for authentication and CRUD operations on users, decks, and cards. The backend code is located in the backend/
directory.
Controllers handle the business logic for different routes and are located in the backend/controllers/
directory:
auth.js
card.js
deck.js
user.js
Data models define the structure of the database tables and their relationships. They are located in the backend/models/
directory.
Routes define the endpoints of the API and are located in the backend/routes/
directory.
The frontend is built with Vue.js and Nuxt.js, using Vue Router for routing. The frontend code is located in the frontend/
directory.
The pages
directory contains Vue components mapped to routes, located in the frontend/pages/
directory.
The components
directory contains reusable Vue components, located in the frontend/components/
directory.
The composables
directory contains reusable Vue composition API functions, located in the frontend/composables/
directory.
Follow these steps to set up the project locally.
Ensure you have the following installed on your machine:
Clone the repository and navigate to the project directory:
git clone <repository-url>
cd <repository-name>
Install dependencies for both backend and frontend:
cd backend
npm install
cd ../frontend
npm install
Start the backend server:
cd backend
npm start or npm run dev
Start the frontend server:
cd frontend
npm run dev
Set up a PostgreSQL database and update the .env
files in both the backend and frontend directories with your database and API credentials.
Here is a list of the environment variables you need to set up in the .env
file:
# Server Configuration
SERVER_PORT=3001
APP_URL=http://localhost:3000
NODE_ENV=production
# Database Configuration
DB_HOST=
DB_PORT=
DB_NAME=
DB_USER=
DB_PASSWORD=
# Security Configuration
BCRYPT_SALT_ROUNDS=
# JWT Configuration
JWT_SECRET=
JWT_EXPIRES_IN=
REFRESH_TOKEN_EXPIRES_IN=
JWT_DEMO_ACCOUNT_EXPIRES_IN=
REFRESH_TOKEN_DEMO_ACCOUNT_EXPIRES_IN=
REFRESH_TOKEN_SECRET=
# Email Service Configuration
MAILJET_API_KEY=
MAILJET_SECRET_KEY=
This project is licensed under the MIT License.