Skip to content

AhVir/EngReji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EngReji

Project Info

Cloud Deployment: Live Link

EngReji is an English-speaking practice app designed to help Bangladeshi users improve their English speaking skills.

If you want to work locally using your own IDE, you can clone this repo and push changes. The only requirement is having Node.js & npm installed - install with nvm


Local Setup

Follow these steps to get the project running locally:

1️⃣ Clone the repository

git clone <YOUR_GIT_URL>

2️⃣ Navigate to the project directory

cd <YOUR_PROJECT_NAME>

3️⃣ Install dependencies

npm install

4️⃣ Set up the database

This project uses PostgreSQL for data storage. Follow these steps:

a) Install PostgreSQL (if not already installed)

sudo apt update
sudo apt install postgresql postgresql-contrib -y
sudo systemctl enable postgresql
sudo systemctl start postgresql

b) Switch to the PostgreSQL user

sudo -i -u postgres

c) Create the database

createdb engreji

d) Set the database password

psql
\password postgres
# Enter: abc123
\q

e) Load the schema

psql -d engreji -f "/path/to/backend/database/schema.sql"

f) Set environment variable for the backend

Create a .env file in the project root with the following content:

DATABASE_URL=postgresql://postgres:abc123@localhost:5432/engreji

g) Test the connection

psql $DATABASE_URL
# \dt  # To list tables

Once this is done, the backend will automatically connect to the database using the DATABASE_URL.

5️⃣ Start the backend

cd backend
npm run dev

6️⃣ Start the frontend

cd frontend
npm run dev

Your app should now be running locally at http://localhost:5173 (or whatever port Vite shows).

7️⃣ Access API Documentation

The API documentation is available through Swagger UI at:

http://localhost:3000/doc

You can:

  • Explore all available endpoints
  • Test API calls directly from the browser
  • View request/response schemas
  • See authentication requirements
  • Download the OpenAPI specification

The raw OpenAPI/Swagger specification is available at swagger.yaml in the project root.


Technologies Used

This project is built with:

Frontend

  • Framework: React 18 with TypeScript
  • Build Tool: Vite
  • Styling:
    • Tailwind CSS
    • shadcn/ui components
    • Framer Motion for animations
  • State Management: React Context
  • API Client: Custom fetch wrapper
  • UI Libraries:
    • Lucide Icons
    • Radix UI primitives
    • class-variance-authority

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • Database: PostgreSQL with node-postgres
  • Authentication: JWT (jsonwebtoken)
  • Security: bcrypt for password hashing
  • API Integration: Supabase

Development Tools

  • Type Checking: TypeScript
  • Testing: Placeholder for tests
  • Version Control: Git
  • API Documentation: Custom Markdown docs
  • Environment: dotenv for configuration

Notes

  • Make sure PostgreSQL service is running before starting the backend:
sudo systemctl start postgresql
  • Do not commit .env to GitHub — it contains sensitive credentials.
  • If you make changes to the database schema, use Prisma migrations or SQL scripts carefully.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors