A full-stack application with React Native frontend and Python Flask backend with SQLAlchemy database.
Longhorn-Studies/
├── frontend/ # React Native application (Expo)
│ ├── App.js # Main app component with API integration
│ ├── package.json # Node.js dependencies
│ ├── app.json # Expo configuration
│ └── README.md # Frontend documentation
│
├── backend/ # Python Flask API with SQLAlchemy
│ ├── app.py # Flask application setup
│ ├── models.py # Database models
│ ├── routes.py # API endpoints
│ ├── requirements.txt # Python dependencies
│ └── README.md # Backend documentation
│
└── README.md # This file
-
Navigate to the backend directory:
cd backend -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the server:
python app.py
The backend will be available at http://localhost:8000
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm start
-
Choose your platform:
- Press
wfor web browser - Press
afor Android emulator - Press
ifor iOS simulator - Scan QR code with Expo Go app on your phone
- Press
- ✅ React Native with Expo for cross-platform support (Web, iOS, Android)
- ✅ Pre-configured with axios for API communication
- ✅ Sample UI with CRUD operations
- ✅ Responsive design with StyleSheet
- ✅ Error handling and loading states
- ✅ Flask REST API with Blueprint architecture
- ✅ SQLAlchemy ORM with SQLite database (easily switchable to PostgreSQL/MySQL)
- ✅ CORS middleware configured for frontend communication
- ✅ Request logging middleware
- ✅ Comprehensive error handling
- ✅ RESTful endpoints for Items and Users
- ✅ Health check endpoint
GET /api/health- Verify API status
GET /api/items- Get all itemsGET /api/items/<id>- Get specific itemPOST /api/items- Create new itemPUT /api/items/<id>- Update itemDELETE /api/items/<id>- Delete item
GET /api/users- Get all usersPOST /api/users- Create new user
- id (Integer, Primary Key)
- name (String, Required)
- description (Text, Optional)
- created_at (DateTime)
- updated_at (DateTime)
- id (Integer, Primary Key)
- username (String, Unique, Required)
- email (String, Unique, Required)
- created_at (DateTime)
For the best development experience, run both frontend and backend simultaneously:
-
Terminal 1 - Backend:
cd backend python app.py -
Terminal 2 - Frontend:
cd frontend npm start
The frontend will automatically connect to the backend API at http://localhost:8000/api.
- React 18.2.0
- React Native 0.72.6
- Expo ~49.0.15
- Axios for HTTP requests
- Python 3.8+
- Flask 3.0.0
- Flask-SQLAlchemy 3.1.1
- Flask-CORS 4.0.0
- SQLAlchemy 2.0.23
Edit backend/.env (copy from .env.example):
DATABASE_URL- Database connection stringSECRET_KEY- Flask secret keyPORT- Server port (default: 8000)
Edit frontend/App.js:
API_BASE_URL- Backend API URL (default:http://localhost:8000/api)
- Add authentication and authorization
- Implement user sessions and JWT tokens
- Add more complex database relationships
- Implement data validation
- Add unit and integration tests
- Set up CI/CD pipeline
- Deploy to production environment
We follow the Conventional Commits specification for commit messages. This ensures a consistent commit history and enables automated versioning and changelog generation.
<type>/<short-description>
Examples:
- feature/{feature-name}
- fix/{bug-description}
- docs/{documentation-change}
Follow this structure for commit messages
<type>(<scope>): <subject>
Where:
type has one of the following:
- feat: New features
- fix: Bug fixes
- docs: Documentation changes
- style: Code formatting only
- refactor: Code changes without behavior change
- test: Adding or updating tests
- chore: Build process or tooling updates
- Fork or branch from main
- Create a PR with a clear description
- Ensure checks pass (build, lint, test)
- Request review before merging
MIT