A full-stack social media platform built with React Native and GraphQL, featuring real-time interactions, user authentication, and comprehensive social media functionality.
- User Authentication: Secure login/register with JWT tokens
- Social Media Functionality: Create posts, comments, likes, and follow users
- Real-time Updates: Live data synchronization using Apollo Client
- Cross-platform: iOS and Android support with React Native
- Modern UI: Clean, responsive design with Apple-inspired aesthetics
- Offline Support: Data persistence with AsyncStorage
- React Native with Expo
- Apollo Client for GraphQL state management
- React Navigation for routing
- AsyncStorage for local data persistence
- Expo Vector Icons for UI icons
- Node.js with Express.js
- GraphQL with Apollo Server
- MongoDB for database
- JWT for authentication
- Redis for caching
gc01-RahmadAmri/
├── client/
│ └── reddit/
│ ├── components/ # Reusable UI components
│ ├── contexts/ # React Context providers
│ ├── navigation/ # Navigation configuration
│ └── screens/ # App screens
└── server/ # Backend API server
- Node.js (v16 or higher)
- npm or yarn
- Expo CLI
- MongoDB instance
- Redis server (optional, for caching)
-
Clone the repository
git clone https://github.com/H8-FSJS-P3S6/gc01-RahmadAmri.git cd gc01-RahmadAmri -
Install server dependencies
cd server npm install -
Install client dependencies
cd ../client/reddit npm install -
Environment Setup
Create
.envfile in server directory:MONGODB_URI=mongodb://localhost:27017/reddit JWT_SECRET=your_jwt_secret_key REDIS_URL=redis://localhost:6379 PORT=3000
-
Start the backend server
cd server npm start -
Start the React Native app
cd client/reddit npx expo start -
Run on device/simulator
- Scan QR code with Expo Go app (mobile)
- Press
ifor iOS simulator - Press
afor Android emulator
The application uses GraphQL for all API interactions. Main operations include:
-
Authentication
login(input: LoginInput!): User loginregister(input: RegisterInput!): User registration
-
Posts
posts: Get all postscreatePost(input: PostInput!): Create new postlikePost(postId: ID!): Like/unlike post
-
Users
users: Get all usersfollowUser(userId: ID!): Follow/unfollow user
The application follows Apple's design guidelines with:
- Colors: Clean whites, subtle grays, and Apple blue (#007AFF)
- Typography: San Francisco-inspired font hierarchy
- Layout: Generous white space and minimalist design
- Interactions: Subtle animations and smooth transitions
- User registers/logs in with username and password
- Server validates credentials and returns JWT token
- Token stored in AsyncStorage for persistence
- Apollo Client includes token in all requests
- Automatic token validation and refresh
- LoginScreen: User authentication with Apple-inspired design
- RegisterScreen: New user registration
- HomeScreen: Main feed with posts
- ProfileScreen: User profile and settings
- PostDetailScreen: Individual post view with comments
# Run tests
npm test
# Run with coverage
npm run test:coverage- Build with
expo build:androidorexpo build:ios - Submit to Google Play Store or Apple App Store
- Deploy to cloud platforms (AWS, Heroku, DigitalOcean)
- Configure production environment variables
- Set up MongoDB Atlas for production database
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Rahmad Maulidi Amri
- GitHub: @RahmadAmri
- LinkedIn: rahmad-amri
- Hacktiv8 Full Stack JavaScript Bootcamp
- React Native and Expo communities
- Apollo GraphQL documentation
- Apple Design Guidelines inspiration
Built with ❤️ during Hacktiv8 Full Stack JavaScript Immersive Program