- Install dependencies:
pip install -r requirements.txt
- Run the server:
uvicorn main:app --reload --port 8000
- All data is stored in
data.jsonin this directory. - Main endpoints:
/users,/chats,/stories,/search,/settings,/add-up,/groups,/auth/*,/ws/chat/{chat_id}(WebSocket) - Test endpoints using Postman, curl, or the React Native frontend.
- Initialize the React Native project (using Expo recommended):
npx create-expo-app frontend cd frontend npm install - Set up navigation (bottom tabs):
npm install @react-navigation/native @react-navigation/bottom-tabs react-native-screens react-native-safe-area-context npx expo install react-native-gesture-handler react-native-reanimated
- Create API service for backend communication:
- Create
/src/api/index.jsto handle all HTTP requests to the FastAPI backend.
- Create
- Implement authentication screens:
- Create
/src/screens/LoginScreen.js,/src/screens/RegisterScreen.js, and social login if needed.
- Create
- Scaffold main tabs/screens:
/src/screens/ChatsScreen.js/src/screens/GroupsScreen.js/src/screens/StoriesScreen.js/src/screens/SearchScreen.js/src/screens/SettingsScreen.js
cd frontend
npx expo start- Start the backend server (
uvicorn ...) and the frontend (npx expo start) in separate terminals. - Make sure the frontend API service points to your backend URL (e.g.,
http://127.0.0.1:8000).
- Add a
.gitignorefile to exclude environment files, Python cache, and node_modules:
# Python
__pycache__/
*.pyc
.env
# Node/React Native
node_modules/
.expo/
.expo-shared/