A fullstack application for managing a glossary of words and their synonyms. Built with Flask (Python) backend and React (TypeScript) frontend.
- User authentication (register, login, logout)
- Create, read, update, and delete glossary entries
- Search for words and their synonyms
- View word details with definitions and related synonyms
backend/: Flask application with REST APIfrontend/: React TypeScript application with Material UI
- Python 3.8+ with pip
- Node.js 14+ with npm
- Git (optional)
- Clone or download this repository to your local machine
- Navigate to the project directory:
cd synonyms-glossary - Make the start script executable:
chmod +x start.sh(if not already executable) - Run the start script:
./start.sh
This will:
- Build the React frontend
- Copy the build files to the Flask backend's static directory
- Set up a Python virtual environment and install dependencies
- Start the Flask server
- Navigate to the backend directory:
cd backend - Create a virtual environment:
python3 -m venv .venv - Activate the virtual environment:
source .venv/bin/activate(Linux/Mac) or.venv\Scripts\activate(Windows) - Install dependencies:
pip install -r requirements.txt - Set environment variables:
export FLASK_APP=run.py export FLASK_ENV=development export FLASK_DEBUG=true - Run the Flask application:
flask run
- Navigate to the frontend directory:
cd frontend - Install dependencies:
npm install - Start the development server:
npm start
- The backend is built with Flask and uses SQLAlchemy for database operations
- Authentication is handled with JWT tokens
- API endpoints follow RESTful conventions
- The frontend is built with React and TypeScript
- Material UI is used for components and styling
- Axios is used for API calls
- React Router is used for client-side routing
For production deployment:
-
Set appropriate environment variables for the backend:
export FLASK_ENV=production export FLASK_DEBUG=false export SECRET_KEY=your-secret-key export JWT_SECRET_KEY=your-jwt-secret-key export DATABASE_URL=your-database-url -
Build the frontend:
cd frontend && npm run build -
Copy the build files to the backend static directory
-
Run the Flask application with a production WSGI server like Gunicorn:
gunicorn --bind 0.0.0.0:5000 run:app