Skip to content

thelonewolf39/Language-Learning-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Language Learning Web - Spanish Edition

A self-hosted language learning platform for learning Spanish, built with Vue.js and FastAPI.

🌐 Visit our Landing Page | 🀝 Contribute

The landing page is hosted at the root of this repo and deploys automatically to Vercel!


Features

  • 5 Complete Lessons covering:

    • Basic Greetings
    • Numbers 1-20
    • Common Foods
    • Colors
    • Family Members
  • Interactive Learning:

    • Vocabulary cards with text and audio pronunciations (click πŸ”Š to hear!)
    • Practice quizzes with instant feedback
    • Score tracking for each lesson
    • Text-to-speech pronunciation using Web Speech API
  • User System:

    • User registration and authentication
    • Progress tracking (coming soon)
  • Fully Dockerized: Easy deployment with Docker Compose

Quick Start with Docker

Prerequisites

  • Docker
  • Docker Compose

Running the Application

  1. Clone the repository:
git clone https://github.com/thelonewolf39/Language-Learning-web.git
cd Language-Learning-web
  1. Start the application:
docker-compose up -d
  1. Access the application:

  2. Stop the application:

docker-compose down

Rebuilding After Changes

If you make changes to the code:

docker-compose up -d --build

Development Setup (Without Docker)

Backend Setup

  1. Navigate to backend directory:
cd backend
  1. Create virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the server:
uvicorn app.main:app --reload --host 127.0.0.1 --port 8000

Frontend Setup

  1. Navigate to frontend directory:
cd frontend
  1. Install dependencies:
npm install
  1. Run development server:
npm run dev
  1. Build for production:
npm run build

Project Structure

Language-Learning-web/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ main.py          # FastAPI application
β”‚   β”‚   β”œβ”€β”€ models.py        # Database models
β”‚   β”‚   β”œβ”€β”€ schemas.py       # Pydantic schemas
β”‚   β”‚   β”œβ”€β”€ crud.py          # Database operations
β”‚   β”‚   └── lessons.json     # Lesson content
β”‚   β”œβ”€β”€ data/
β”‚   β”‚   └── users.db         # SQLite database
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── .dockerignore
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ MainPage.vue      # Main landing page
β”‚   β”‚   β”‚   β”œβ”€β”€ LessonCard.vue    # Lesson preview card
β”‚   β”‚   β”‚   └── LessonView.vue    # Interactive lesson view
β”‚   β”‚   β”œβ”€β”€ App.vue
β”‚   β”‚   └── main.js
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ nginx.conf
β”‚   β”œβ”€β”€ package.json
β”‚   └── .dockerignore
└── docker-compose.yml

API Endpoints

  • POST /api/v1/users/register - Register new user
  • GET /api/v1/lessons - Get all available lessons

Technology Stack

Backend

  • FastAPI - Modern Python web framework
  • SQLAlchemy - SQL toolkit and ORM
  • Passlib with Argon2 - Password hashing
  • SQLite - Database

Frontend

  • Vue 3 - Progressive JavaScript framework
  • Vite - Fast build tool
  • Axios - HTTP client
  • Tailwind CSS - Utility-first CSS

Deployment

  • Docker - Containerization
  • Docker Compose - Multi-container orchestration
  • Nginx - Web server for frontend

Environment Variables

Backend

  • DATABASE_URL - Database connection string (default: sqlite:///./data/users.db)

Frontend

Lesson Structure

Each lesson includes:

  • Title & Description - Overview of the lesson
  • Difficulty Level - Beginner, intermediate, or advanced
  • Vocabulary - Spanish words with English translations and pronunciations
  • Exercises - Multiple-choice quizzes to test knowledge

Landing Page Deployment

The project includes a beautiful landing page at the root (index.html) that explains the project and welcomes contributors.

Deploy to Vercel

  1. Via Vercel Dashboard:

    • Go to vercel.com
    • Import your GitHub repository
    • Deploy with default settings
    • Done! Your landing page is live
  2. Via Vercel CLI:

    npm install -g vercel
    vercel
  3. Automatic Deployment:

    • Connect your GitHub repo to Vercel
    • Every push to main deploys automatically

The landing page includes:

  • Project overview and features
  • Complete setup instructions
  • Tech stack details
  • Contribution guidelines

Future Enhancements

  • User authentication with JWT tokens
  • Progress tracking for completed lessons
  • Spaced repetition algorithm for vocabulary review
  • Audio pronunciations βœ… Completed! (Click πŸ”Š on vocabulary cards)
  • More advanced lessons (intermediate and advanced levels)
  • Writing exercises
  • Conversation practice scenarios
  • Leaderboard and achievements
  • Record user pronunciation and compare with native speech

Contributing

We welcome contributions from developers, designers, and language experts!

Ways to contribute:

  • Add more lessons and vocabulary
  • Implement new features
  • Improve UI/UX design
  • Fix bugs and improve performance
  • Write documentation
  • Translate to other languages

How to start:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Check out our landing page for more details on contributing!

License

This project is for educational purposes.