A full-stack application with a Node.js backend API and a React Native frontend for user and friend management.
This project consists of a RESTful backend API built with Node.js, Express, and MongoDB, and a React Native frontend for mobile app development. The backend provides endpoints for user CRUD operations, while the frontend consumes these APIs using Redux Toolkit for state management.
- Node.js – JavaScript runtime
- Express – Web framework
- MongoDB – NoSQL database
- Mongoose – MongoDB ODM
- ESLint – Code linter
- Prettier – Code formatter
- Nodemon – Auto-reload during development
- Joi – Data validation
- Morgan – HTTP request logger
- React Native – Mobile framework
- Redux Toolkit – State management
- React Navigation – Navigation library
- TypeScript – Type safety
- Jest – Testing framework
- Node.js v16+
- npm or yarn
- MongoDB (local or cloud, e.g., MongoDB Atlas)
- React Native development environment (Android Studio for Android, Xcode for iOS)
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Create a
.envfile in the backend root:MONGO_URI=mongodb+srv://your-user:your-password@your-cluster.mongodb.net/your-database PORT=3000
-
Start the server:
# Development (with auto-reload) npm run dev # Production npm start
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
For iOS, install CocoaPods:
bundle install cd ios && bundle exec pod install && cd ..
-
Start Metro:
npm start
-
Run the app:
# Android npm run android # iOS npm run ios
/
├── backend/
│ ├── src/
│ │ ├── config/
│ │ │ └── db.js # MongoDB configuration
│ │ ├── controllers/
│ │ │ └── userController.js # Endpoint logic
│ │ ├── models/
│ │ │ └── User.js # User schema
│ │ ├── routes/
│ │ │ └── userRoutes.js # Route definitions
│ │ ├── services/
│ │ │ └── userService.js # Business logic
│ │ ├── middlewares/
│ │ │ ├── errorHandler.js # Global error handling
│ │ │ └── logger.js # Logging middleware
│ │ └── server.js # Main file
│ ├── eslint.config.mjs
│ ├── package.json
│ └── README.md
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── Divider.tsx
│ │ │ ├── FriendCard.tsx
│ │ │ ├── InfoList.tsx
│ │ │ ├── SearchBar.tsx
│ │ │ └── ToggleCell.tsx
│ │ ├── navigation/
│ │ │ └── AppNavigator.tsx
│ │ ├── screens/
│ │ │ ├── FriendProfileView.tsx
│ │ │ ├── HomeView.tsx
│ │ │ ├── ProfileView.tsx
│ │ │ └── SearchView.tsx
│ │ ├── store/
│ │ │ ├── friendSlice.tsx
│ │ │ ├── index.tsx
│ │ │ ├── types.tsx
│ │ │ └── userSlice.tsx
│ │ ├── utils/
│ │ │ └── dataUtils.tsx
│ │ └── App.tsx
│ ├── android/
│ ├── ios/
│ ├── package.json
│ └── README.md
└── README.md
# Start server in development mode
npm run dev
# Start server in production
npm start
# Run linter
npm run lint
# Fix linting issues
npm run lint:fix# Start Metro
npm start
# Run on Android
npm run android
# Run on iOS
npm run ios
# Run tests
npm test- ✅ Data validation with Joi or express-validator
- ✅ Secure environment variables (.env + dotenv)
- ✅ Global error handling (error middleware)
- ✅ Logs with Morgan
- ✅ Deploy on Render.com
- ✅ Add CI/CD
- ✅ React Native setup
- ✅ React Navigation
- ✅ Redux Toolkit
- ✅ Connect with API (RTK Query)
- ✅ TODO: Implement pull-to-refresh functionality
- ✅ TODO: Add error handling and retry mechanism
- ✅ Implement screens
- Home ✅
- Profile ✅
- Search ✅
- FriendProfile ✅
- ✅ i18n
- ⏳ Authentication (JWT + bcrypt)
- ⏳ Authorization (roles & ownership)
- ⏳ Helmet (security headers)
- ⏳ Rate limiting
- ⏳ Refresh tokens
- ⏳ DTOs (input / output)
- ⏳ Automated tests
- ⏳ Production logs
- ⏳ Config per environment
- ⏳ Health check
- ⏳ Update README
- ⏳ Swagger for API documentation
FE Improvements Planning Document
- ⏳ Migration to RTK Query (API Layer & Cache)
- ⏳ Real Authentication Flow (Auth Layer)
- ⏳ Local Persistence (Redux Persist)
- ⏳ Network State Management (Loading/Error/Empty)
- ⏳ Dynamic Navigation with Parameters
- ⏳ Optimistic Updates (High Performance UI)
- ⏳ implement pagination for large friend lists
MONGO_URI– MongoDB connection stringPORT– Server port (default: 3000)
The backend uses ESLint with Prettier for code quality. Rules are configured in eslint.config.mjs.
- Create a branch for your feature (
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 ISC license.
Guilherme Ferreira Lenzolari
GitHub: https://github.com/guilenzolari
Built by a FE developer to learn about BE