A comprehensive financial investment platform enabling users to invest in various packages, manage multiple wallets, and track investment returns with seamless onboarding, KYC verification, and multi-provider authentication.
- Overview
- Features
- Tech Stack
- Prerequisites
- Installation
- Configuration
- Project Structure
- Usage
- Backend API
- Running Tests & Linting
- Deployment
- Contributing
- License
Owopor is a full-stack investment platform that combines a mobile-first React Native frontend with a robust Go backend. The platform handles the complete user journey from authentication through KYC verification to investment management, with built-in support for risk assessment, multi-wallet systems, and real-time investment tracking.
- User Management & Authentication β Multi-provider OAuth, JWT-based auth, OTP verification
- KYC Verification β Document capture, submission, and verification workflows
- Investment Management β Package selection, portfolio tracking, returns calculation
- Wallet System β Multi-wallet support (main, investment, savings) with balance tracking
- Bank Account Linking β Secure bank account linking with verification
- Risk Assessment β User profiling questionnaire for investment recommendations
- Notifications β Push notifications, email, and SMS alerts for user updates
- β Multi-Platform Support β iOS, Android, and Web via React Native & Expo
- β Secure Authentication β JWT tokens, OAuth2 (Google & GitHub), session management
- β KYC Workflow β Document capture via device camera with verification pipeline
- β Bank Integration β Account linking with OTP verification
- β Investment Packages β Tiered investment options with transparent returns tracking
- β Multi-Wallet Architecture β Segregated wallets with inter-wallet transfers
- β Risk Assessment β Questionnaire-based user profiling and recommendations
- β Responsive UI β Native mobile experience with adaptive layouts
- β Real-time Updates β Live balance and investment return tracking
- β Code Quality β ESLint for frontend, TypeScript strict mode, Prettier formatting
| Layer | Technology |
|---|---|
| Framework | React Native 19.1.1 with Expo 54.0.27 |
| Routing | Expo Router 6.0.17 with file-based routing |
| Language | TypeScript 5.9 |
| State Management | React Hook Form 7.67.0, AsyncStorage |
| Authentication | Firebase Auth, Expo Auth Session |
| Navigation | React Navigation 7.1.6 + Bottom Tabs |
| UI Components | Expo Vector Icons, Expo Blur, Expo Linear Gradient |
| Media | Expo Camera, Expo Image |
| Code Quality | ESLint, Prettier, Husky, Commitlint |
| Layer | Technology |
|---|---|
| Language | Go 1.25.4 |
| Server | net/http (standard library) |
| Database | PostgreSQL with pgx/v5 driver |
| Authentication | JWT (golang-jwt), OAuth2, Session cookies |
| Security | golang.org/x/crypto, gorilla/sessions |
| API | RESTful HTTP endpoints |
- Firebase β User authentication, storage, messaging
- PostgreSQL β Primary data store
- OAuth Providers β Google, GitHub
- macOS/Linux/Windows with Bash or PowerShell terminal
- Node.js 18+ and npm/yarn
- Go 1.25.4 or later
- PostgreSQL 13+ (local or cloud instance)
- Git 2.0+
For mobile development:
- Xcode (macOS only, for iOS development)
- Android Studio (for Android development)
- Expo CLI (optional; npm install -g expo-cli)
git clone https://github.com/BalkyBoy/Owopor.git
cd Owoporcd client
npm install
# or
yarn installcd ../server
go mod download
go mod tidyCreate a PostgreSQL database and update the connection string:
psql -U postgres
CREATE DATABASE owopor;Create a .env.local file in the client/ directory with Firebase configuration (already included in firebaseConfig.js):
// client/firebaseConfig.js
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_STORAGE_BUCKET",
messagingSenderId: "YOUR_MESSAGING_ID",
appId: "YOUR_APP_ID",
};Set environment variables before running the server:
export DATABASE_URL="postgres://user:password@localhost:5432/owopor"
export JWT_SECRET="your-jwt-secret-key-change-in-production"
export REFRESH_SECRET="your-refresh-secret-key-change-in-production"
export SESSION_KEY="your-session-key-change-in-production"
export GOOGLE_CLIENT_ID="your-google-oauth-client-id"
export GOOGLE_CLIENT_SECRET="your-google-oauth-client-secret"
export GITHUB_CLIENT_ID="your-github-oauth-client-id"
export GITHUB_CLIENT_SECRET="your-github-oauth-client-secret"Alternatively, update hardcoded values in server/internal/config/config.go and server/internal/auth/models.go.
- Go to Google Cloud Console
- Create a new project
- Enable Google+ API
- Create OAuth 2.0 credentials (Web application)
- Add redirect URI:
http://localhost:8080/auth/google/callback - Copy Client ID and Secret to environment variables
- Go to GitHub Settings β Developer settings β OAuth Apps
- Create a new OAuth App
- Set Authorization callback URL:
http://localhost:8080/auth/github/callback - Copy Client ID and Secret to environment variables
Owopor/
βββ client/ # React Native Expo frontend
β βββ app/ # Expo Router application root (file-based routing)
β β βββ _layout.tsx # Root layout with theme & font initialization
β β βββ index.tsx # Landing/home screen
β β βββ (auth)/ # Authentication flow screens
β β β βββ _layout.tsx
β β β βββ login.tsx
β β β βββ sign-up.tsx
β β β βββ otp.tsx
β β β βββ verification.tsx
β β βββ (onboarding)/ # Onboarding flow
β β β βββ _layout.tsx
β β β βββ onboarding.tsx # Intro screen
β β β βββ onboarding1.tsx
β β β βββ onboarding2.tsx
β β β βββ onboarding3.tsx
β β βββ (kyc)/ # KYC verification flow
β β β βββ Capture.tsx # Document capture via camera
β β β βββ Flow.tsx # KYC workflow orchestrator
β β β βββ Success.tsx # Verification success screen
β β β βββ Verify.tsx # Document verification
β β βββ (bank)/ # Bank account linking
β β β βββ acount.tsx # Account details
β β β βββ card.tsx # Card linking
β β β βββ link.tsx # Linking workflow
β β β βββ OTPVerificationScreen.tsx
β β βββ (assesment)/ # Risk assessment questionnaire
β β β βββ stepThree.tsx
β β β βββ stepFour.tsx
β β β βββ components/
β β βββ (profile)/ # User profile management
β β β βββ profilePhoto.tsx
β β β βββ Upload.tsx
β β βββ (tabs)/ # Main app tab-based navigation
β β β βββ _layout.tsx # BottomTabNavigator
β β β βββ Dashboard.tsx # Main dashboard/home
β β β βββ Assets.tsx # Investment assets & holdings
β β β βββ Wallets.tsx # Multi-wallet view
β β β βββ Profile.tsx # User profile tab
β β βββ (screens)/ # Additional screens
β β β βββ Menu.tsx
β β β βββ Notifications.tsx
β β β βββ Packages.tsx # Investment packages
β β βββ (terms)/ # Terms & conditions
β β βββ _layout.tsx
β β βββ terms.tsx
β βββ components/ # Reusable React components
β β βββ AmountInput.tsx
β β βββ Checkbox.tsx
β β βββ Line.tsx
β β βββ ProgressBar.tsx
β β βββ QuestionHeader.tsx
β β βββ ... (other shared components)
β βββ assets/
β β βββ fonts/ # Custom fonts (ReadexPro)
β β βββ images/ # App icons, splash screens, adaptive icons
β βββ firebaseConfig.js # Firebase initialization
β βββ package.json # Frontend dependencies
β βββ tsconfig.json # TypeScript configuration
β βββ eslint.config.js # ESLint configuration
β βββ prettier.config.js # Code formatting rules
β βββ app.json # Expo app configuration
β βββ eas.json # EAS (Expo Application Services) build config
β βββ commitlint.config.js # Commit message linting
β
βββ server/ # Go backend server
β βββ cmd/
β β βββ main.go # Server entry point, route definitions
β βββ internal/
β β βββ auth/ # Authentication handlers & middleware
β β β βββ handler_jwt.go # JWT login, registration, refresh
β β β βββ handler_oauth.go # OAuth2 handlers (Google, GitHub)
β β β βββ handler_session.go # Session-based auth
β β β βββ middleware.go # JWT verification middleware
β β β βββ models.go # Auth data models
β β β βββ store.go # User storage/database logic
β β β βββ utils.go # Auth utilities (token generation, validation)
β β βββ config/ # Configuration & constants
β β β βββ config.go # OAuth credentials, JWT secrets
β β βββ database/ # Database connection
β β βββ postgres.go # PostgreSQL pool management
β βββ go.mod # Go module definition
β βββ go.sum # Go dependency checksums
β
βββ BACKEND_ARCHITECTURE.md # Detailed backend architecture documentation
βββ README.md # This file
From the client/ directory:
# Start the Expo development server (opens menu for platform selection)
npm start
# Run on iOS (macOS only)
npm run ios
# Run on Android
npm run android
# Run on Web
npm run webDevelopment Server:
- Press
ifor iOS simulator - Press
afor Android emulator - Press
wfor web browser - Scan QR code with Expo Go app on physical device
From the server/ directory:
# Run the server
go run ./cmd/main.goThe server will start on http://localhost:8080
π Complete Auth System running on :8080
From the client/ directory:
# Lint the code
npm run lint
# Auto-fix linting issues
npm run lint -- --fix
# Format code with Prettier
npm run format
# Prepare Git hooks (pre-commit linting)
npm run prepare| Method | Endpoint | Description | Body |
|---|---|---|---|
| POST | /auth/register |
Register new user | { email, password, name } |
| POST | /login |
JWT login | { email, password } |
| POST | /refresh |
Refresh JWT token | { refresh_token } |
| POST | /forgot-password |
Initiate password reset | { email } |
| POST | /reset-password |
Complete password reset | { token, new_password } |
| GET | /protected |
Verify JWT (middleware test) | Headers: Authorization: Bearer <token> |
| GET | /me |
Get current user info | Headers: Authorization: Bearer <token> |
| Method | Endpoint | Description |
|---|---|---|
| POST | /session/login |
Login with session cookie |
| POST | /session/logout |
Logout and clear session |
| GET | /session/protected |
Protected endpoint (session required) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /auth/google |
Initiate Google OAuth flow |
| GET | /auth/google/callback |
Google OAuth redirect URI |
| GET | /auth/github |
Initiate GitHub OAuth flow |
| GET | /auth/github/callback |
GitHub OAuth redirect URI |
JWT Bearer Token:
curl -H "Authorization: Bearer <your-jwt-token>" http://localhost:8080/protectedRequest Example:
curl -X POST http://localhost:8080/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"secure123","name":"John Doe"}'# Run ESLint
npm run lint
# Format code
npm run format
# Check TypeScript types
npx tsc --noEmitcd ../server
# Run tests (if test suite exists)
go test ./...
# Run with verbose output
go test -v ./...
# Format code
go fmt ./...
# Lint with golangci-lint (if installed)
golangci-lint run ./...
# Check for security vulnerabilities
go list -json ./... | nancy sleuthnpm install -g eas-cli
# Log in to Expo
eas login
# Build for iOS
eas build --platform ios
# Build for Android
eas build --platform android
# Submit to app stores
eas submit --platform ios
eas submit --platform android# Create a web build
npm run web
# Deploy the `web-build/` directory to hosting (Vercel, Netlify, etc.)Create a Dockerfile in the server/ directory:
FROM golang:1.25
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o server ./cmd/main.go
EXPOSE 8080
CMD ["./server"]Build and run:
docker build -t owopor-server .
docker run -e DATABASE_URL="..." -p 8080:8080 owopor-server# Heroku example
git push heroku main
# Set environment variables
heroku config:set DATABASE_URL="postgres://..."
heroku config:set JWT_SECRET="your-secret"Always set these in your hosting platform:
DATABASE_URLβ PostgreSQL connection stringJWT_SECRETβ Strong random string (useopenssl rand -hex 32)REFRESH_SECRETβ Refresh token secretSESSION_KEYβ Session encryption keyGOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRETGITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit with conventional commits:
git commit -m "feat: add amazing feature" - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Frontend: Use TypeScript strict mode, ESLint, Prettier
- Backend: Format with
go fmt, passgo vet, use meaningful naming - Commits: Follow Conventional Commits
cd client
npm run prepare
# This installs Husky & Commitlint to enforce commit standardsThis project is proprietary. All rights reserved.
For detailed backend architecture, see BACKEND_ARCHITECTURE.md.
For issues, feature requests, or questions, please open an issue on GitHub.