Leading Technical Innovation at Capitalino: Building FinTech Infrastructure from Scratch
The Opportunity
In October 2023, I received a call that would shape the next two years of my career. The former Vice President of CITEX, one of Iran's largest cryptocurrency exchanges, was launching a new venture called Capitalino—a FinTech platform focused on digital investment management. They needed someone to build the technical foundation from scratch.
This wasn't just another job offer. It was an opportunity to architect and build critical financial infrastructure, lead a growing team, and create systems that would handle real money for real users. I said yes.
Building the Foundation
The Challenge
Starting a FinTech company means you're building trust, not just software. Every line of code needs to be secure. Every API endpoint needs to handle edge cases. Every database transaction needs to be atomic. The margin for error is zero.
When I joined, Capitalino had:
The Architecture
I designed a microservices architecture that could scale horizontally while maintaining security and reliability:
// Core service architecture
├── api-gateway/ // Nginx-based routing and rate limiting
├── auth-service/ // JWT-based authentication with 2FA
├── user-service/ // User management and profiles
├── investment-service/ // Core investment logic
├── payment-service/ // Crypto-to-fiat gateway
├── notification-service/ // Real-time alerts via WebSocket
└── analytics-service/ // Data aggregation and reporting
Key Technical Decisions
1. Technology Stack
2. Security First
3. Developer Experience
Core Systems Built
1. Investor Dashboard
The investor dashboard was the heart of the platform. It needed to:
Technical Implementation:
// Real-time portfolio aggregation
async function getPortfolioValue(userId: string): Promise {
const cacheKey = portfolio:${userId};
const cached = await redis.get(cacheKey);
if (cached) return parseFloat(cached);
// Aggregate from multiple sources
const [investments, crypto, fiat] = await Promise.all([
InvestmentService.getTotal(userId),
CryptoService.getBalance(userId),
FiatService.getBalance(userId)
]);
const total = investments + crypto + fiat;
await redis.setex(cacheKey, 30, total.toString()); // 30s cache
return total;
}
Performance Optimizations:
2. Crypto-to-Fiat Payment Gateway
Building a payment gateway that bridges cryptocurrency and traditional banking was one of the most complex challenges. It required:
Transaction Flow:
async function processPayment(
userId: string,
amount: number,
fromCurrency: string,
toCurrency: string
): Promise {
const session = await mongoose.startSession();
session.startTransaction();
try {
// 1. Lock user account
await UserService.lockAccount(userId, session);
// 2. Verify balance
const balance = await BalanceService.getBalance(
userId,
fromCurrency,
session
);
if (balance < amount) {
throw new InsufficientFundsError();
}
// 3. Get exchange rate
const rate = await ExchangeService.getRate(fromCurrency, toCurrency);
// 4. Execute atomic transaction
await Promise.all([
BalanceService.debit(userId, fromCurrency, amount, session),
BalanceService.credit(userId, toCurrency, amount * rate, session),
TransactionService.create({
userId,
fromCurrency,
toCurrency,
amount,
rate,
status: 'completed'
}, session)
]);
await session.commitTransaction();
return { success: true, transactionId: transaction._id };
} catch (error) {
await session.abortTransaction();
throw error;
} finally {
session.endSession();
}
}
3. RESTful API Design
I designed a RESTful API that followed industry best practices:
// API versioning
/api/v1/investments
/api/v1/investments/:id
/api/v1/investments/:id/transactions// Consistent response format
interface ApiResponse {
success: boolean;
data?: T;
error?: {
code: string;
message: string;
details?: any;
};
meta?: {
page: number;
limit: number;
total: number;
};
}
// Error handling middleware
app.use((err, req, res, next) => {
logger.error('API Error', { error: err, path: req.path });
const status = err.statusCode || 500;
res.status(status).json({
success: false,
error: {
code: err.code || 'INTERNAL_ERROR',
message: err.message || 'An unexpected error occurred',
...(process.env.NODE_ENV === 'development' && { stack: err.stack })
}
});
});
Award-Winning Projects
AI Hologram Installation (ITEX 2024)
One of the most exciting projects was building an AI-powered hologram installation for ITEX 2024. The goal was to create an interactive experience that would attract visitors and showcase Capitalino's innovative spirit.
Technical Stack:
Architecture:
# FastAPI endpoint for hologram interaction
@app.post("/api/hologram/interact")
async def process_interaction(gesture: GestureData):
# Real-time gesture recognition
recognized = await ai_model.predict(gesture.image)
# Generate appropriate response
response = await response_generator.generate(
intent=recognized.intent,
context=gesture.context
)
# Broadcast to connected clients
await websocket_manager.broadcast({
'type': 'hologram_response',
'data': response
})
return {'success': True, 'response': response}
Result: Capitalino won Best Booth at ITEX 2024, largely due to the innovative hologram installation that drew thousands of visitors.
Financial Trading Gamification Platform (ITEX 2023)
For the Shiraz ITEX 2023 exhibition, I built a competitive gamification platform that allowed visitors to simulate financial trading in real-time.
Features:
Tech Stack:
Team Leadership
Building the Team
As the Technical Lead, I was responsible for:
Processes Established
- Two-week sprints
- Daily standups
- Sprint retrospectives
- Kanban board for task tracking
- ESLint and Prettier for code formatting
- TypeScript strict mode
- Minimum 80% test coverage
- Mandatory code reviews
- API documentation with Swagger
- Architecture decision records (ADRs)
- Runbooks for operations
- Onboarding guides for new developers
Challenges and Solutions
Challenge 1: Scaling Under Load
Problem: During peak hours, the dashboard was slow and sometimes unresponsive.
Solution:
Result: Response times improved from 2-3 seconds to under 200ms.
Challenge 2: Payment Gateway Reliability
Problem: Intermittent failures in the crypto-to-fiat gateway were causing transaction failures.
Solution:
Result: Transaction success rate improved from 92% to 99.7%.
Challenge 3: Team Scaling
Problem: As the team grew, knowledge silos developed and onboarding became difficult.
Solution:
Metrics and Impact
During my tenure at Capitalino:
Lessons Learned
Conclusion
Leading the technical team at Capitalino was one of the most rewarding experiences of my career. I got to build critical financial infrastructure, lead a talented team, and create systems that handled real money for real users. The experience taught me that technical leadership is about more than just writing code—it's about building systems, processes, and teams that can scale and succeed.
The skills I developed—from microservices architecture to team leadership—continue to shape how I approach technical challenges today.
---
Interested in learning more about building FinTech infrastructure or technical leadership? Feel free to reach out!