Skip to content

Instantly share code, notes, and snippets.

View Taofiqq's full-sized avatar
🎯
Focusing

Taofiq Aiyelabegan Taofiqq

🎯
Focusing
View GitHub Profile
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['./assets/fonts']
};
import {View, Text, StyleSheet} from 'react-native';
import React from 'react';
const App = () => {
return (
<View style={styles.container}>
<Text style={styles.text}>App</Text>
<Text style={styles.containerText}>App</Text>
</View>
);
@Taofiqq
Taofiqq / Screens.js
Last active May 20, 2022 20:03
Screens
// Settings Screen
import { StyleSheet, Text, View } from "react-native";
import React from "react";
import { createStackNavigator } from "@react-navigation/stack";
const Stack = createStackNavigator();
const Settings = () => (
<View style={styles.container}>
<Text>Settings</Text>
@Taofiqq
Taofiqq / Footer.js
Last active August 2, 2022 02:59
Navbar and Footer Component
@Taofiqq
Taofiqq / NavbarHook.css
Created February 5, 2024 09:37
This is a CSS file for the NavbarHook.js code, where the link to this gist was attached.
.header {
position: fixed;
width: 100%;
top: 0;
left: 0;
background-color: transparent;
z-index: var(--z-fixed);
}
.nav {
@Taofiqq
Taofiqq / folder-structure.md
Created December 31, 2024 16:38
Folder structure for a multi-tenant e-commerce API using NestJS with role-based access control and Permit.io integration.
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”œβ”€β”€ auth.controller.ts
β”‚   β”‚   β”œβ”€β”€ auth.module.ts
β”‚   β”‚   β”œβ”€β”€ auth.service.ts
β”‚   β”‚   β”œβ”€β”€ jwt.strategy.ts
β”‚   β”‚   β”œβ”€β”€ dto/
β”‚   β”‚   β”‚   β”œβ”€β”€ login.dto.ts
β”‚   β”‚   β”‚   └── register-tenant.dto.ts
@Taofiqq
Taofiqq / auth.controller.ts
Created December 31, 2024 20:01
A gist for Auth Module - Multi Tenant E-commerce API
import { Controller, Post, Body } from '@nestjs/common';
import { AuthService } from './auth.service';
import { LoginDto } from './dto/login.dto';
import { RegisterTenantDto } from './dto/register-tenant.dto';
@Controller('auth')
export class AuthController {
constructor(private readonly authService: AuthService) {}
@Post('register-tenant')
@Taofiqq
Taofiqq / create-user.dto.ts
Created December 31, 2024 20:21
User Module - Multi Tenant E-commerce API
import { IsEmail, IsString } from 'class-validator';
export class CreateUserDto {
@IsEmail()
email: string;
@IsString()
firstName: string;
@IsString()
@Taofiqq
Taofiqq / product.controller.ts
Created December 31, 2024 21:01
Product Module - MultiTenant Ecommerce API
import {
Controller,
Get,
Post,
Body,
Param,
Delete,
UseGuards,
} from '@nestjs/common';
import { ProductService } from './product.service';
@Taofiqq
Taofiqq / order.controller.ts
Created December 31, 2024 22:24
Orders Module
import { Controller, Post, Get, Param, Body } from '@nestjs/common';
import { OrderService } from './order.service';
import { CreateOrderDto } from './order.dto';
import { CurrentTenant } from '../tenants/tenant.decorator';
import { Tenant } from '../tenants/tenant.entity';
@Controller('orders')
export class OrderController {
constructor(private readonly orderService: OrderService) {}