committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 452 additions and 206 deletions
-
41README.md
-
2android/.idea/.name
-
4android/app/build.gradle
-
10android/app/src/main/java/com/vernu/sms/activities/MainActivity.java
-
2android/app/src/main/res/layout/activity_main.xml
-
8android/app/src/main/res/values-night/themes.xml
-
2android/app/src/main/res/values/strings.xml
-
8android/app/src/main/res/values/themes.xml
-
2android/settings.gradle
-
4api/src/main.ts
-
2web/.env.example
-
52web/components/Footer.tsx
-
17web/components/Navbar.tsx
-
11web/components/dashboard/DeviceList.tsx
-
61web/components/dashboard/GenerateApiKey.tsx
-
7web/components/dashboard/SendSMS.tsx
-
32web/components/dashboard/UserStats.tsx
-
5web/components/dashboard/UserStatsCard.tsx
-
42web/components/home/CodeSnippetSection.tsx
-
88web/components/home/DownloadAppSection.tsx
-
47web/components/home/FeaturesSection.tsx
-
30web/components/home/HowItWorksSection.tsx
-
67web/components/home/IntroSection.tsx
-
10web/components/home/howItWorksContent.ts
-
4web/components/meta/Meta.tsx
-
6web/lib/customAxios.ts
-
9web/next.config.js
-
6web/pages/_app.tsx
-
13web/pages/api/hello.ts
-
11web/pages/dashboard/index.tsx
-
26web/pages/index.tsx
-
BINweb/public/favicon.ico
-
BINweb/public/images/landing-img1.jpeg
-
BINweb/public/images/smsgatewayandroid.png
-
23web/services/index.ts
-
4web/services/types.ts
-
2web/shared/constants.ts
@ -0,0 +1,41 @@ |
|||
# TextBee - Android SMS Gateway |
|||
|
|||
A simple SMS gateway that allows users to send SMS messages from a web interface or |
|||
from their application via a REST API. It utilizes android phones as SMS gateways. |
|||
|
|||
- **Technology stack**: React, Next.js, Node.js, NestJs, MongoDB, Android, Java |
|||
- **Status**: MVP in development, not ready for production use yet |
|||
- **Link**: [https://textbee.vernu.dev](https://textbee.vernu.dev/) |
|||
|
|||
 |
|||
|
|||
## Usage |
|||
|
|||
1. Go to [textbee.vernu.dev](https://textbee.vernu.dev) and register or login with your account |
|||
2. Install the app on your android phone from [textbee.vernu.dev/android](https://textbee.vernu.dev/android) |
|||
3. Open the app and grant the permissions for SMS |
|||
4. Go to [textbee.vernu.dev/dashboard](https://textbee.vernu.dev/dashboard) and click register device/ generate API Key |
|||
5. Scan the QR code with the app or enter the API key manually |
|||
6. You are ready to send SMS messages from the dashboard or from your application via the REST API |
|||
|
|||
**Code Snippet**: Few lines of code showing how to send an SMS message via the REST API |
|||
|
|||
```javascript |
|||
const API_KEY = 'YOUR_API_KEY'; |
|||
const DEVICE_ID = 'YOUR_DEVICE_ID'; |
|||
|
|||
await axios.post(`https://api.textbee.vernu.dev/api/v1/devices/${DEVICE_ID}/sendSMS?apiKey=${API_KEY}`, { |
|||
receivers: [ '+251912345678' ], |
|||
smsBody: 'Hello World!', |
|||
}) |
|||
|
|||
``` |
|||
|
|||
## Contributing |
|||
|
|||
Contributions are welcome! |
|||
|
|||
1. Fork the project. |
|||
2. Create a feature or bugfix branch from `main` branch. |
|||
3. Make sure your commit messages and PR comment summaries are descriptive. |
|||
4. Create a pull request to the `main` branch. |
|||
@ -1 +1 @@ |
|||
SMS Gateway |
|||
TextBee |
|||
@ -1,3 +1,3 @@ |
|||
<resources> |
|||
<string name="app_name">SMS Gateway</string> |
|||
<string name="app_name">TextBee</string> |
|||
</resources> |
|||
@ -1,2 +1,2 @@ |
|||
NEXT_PUBLIC_API_BASE_URL=https://api.sms.vernu.dev/api/v1 |
|||
NEXT_PUBLIC_API_BASE_URL=https://api.textbee.vernu.dev/api/v1 |
|||
NEXT_PUBLIC_GOOGLE_CLIENT_ID= |
|||
@ -0,0 +1,52 @@ |
|||
import { |
|||
Box, |
|||
chakra, |
|||
Container, |
|||
Stack, |
|||
Text, |
|||
useColorModeValue, |
|||
} from '@chakra-ui/react' |
|||
import Link from 'next/link' |
|||
|
|||
export default function Footer() { |
|||
return ( |
|||
<Box |
|||
bg={useColorModeValue('gray.50', 'gray.900')} |
|||
color={useColorModeValue('gray.700', 'gray.200')} |
|||
> |
|||
<Container |
|||
as={Stack} |
|||
maxW={'6xl'} |
|||
py={4} |
|||
spacing={4} |
|||
justify={'center'} |
|||
align={'center'} |
|||
> |
|||
<Stack direction={'row'} spacing={6}> |
|||
<Link href='/'>Home</Link> |
|||
<Link href='/dashboard'>Dashboard</Link> |
|||
<Link href='/android'>Download App</Link> |
|||
<Link href='https://github.com/vernu/textbee'>Github</Link> |
|||
</Stack> |
|||
</Container> |
|||
|
|||
<Box |
|||
borderTopWidth={1} |
|||
borderStyle={'solid'} |
|||
borderColor={useColorModeValue('gray.200', 'gray.700')} |
|||
> |
|||
<Container |
|||
as={Stack} |
|||
maxW={'6xl'} |
|||
py={4} |
|||
direction={{ base: 'column', md: 'row' }} |
|||
spacing={4} |
|||
justify='center' |
|||
align={{ base: 'center', md: 'center' }} |
|||
> |
|||
<Text>© {new Date().getFullYear()} All rights reserved</Text> |
|||
</Container> |
|||
</Box> |
|||
</Box> |
|||
) |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
import { Box, Flex, Heading, Image, Text } from '@chakra-ui/react' |
|||
import React from 'react' |
|||
|
|||
export default function CodeSnippetSection() { |
|||
return ( |
|||
<Box m={{ base: 0, md: 8 }} p={{ base: 0, md: 8 }}> |
|||
<Flex |
|||
height='100%' |
|||
direction='column' |
|||
justifyContent='center' |
|||
alignItems='center' |
|||
> |
|||
<Heading fontSize={'3xl'} textAlign={'center'} py={8}> |
|||
Code Snippet |
|||
</Heading> |
|||
<Text color={'gray.600'} fontSize={'lg'} textAlign={'center'} pb='4'> |
|||
Send SMS messages from your web application using our REST API. You |
|||
can use any programming language to interact with our API. Here is a |
|||
sample code snippet in JavaScript using axios library. |
|||
</Text> |
|||
|
|||
<Box |
|||
borderRadius={'lg'} |
|||
padding={{ base: 0, md: 8 }} |
|||
border={'1px solid #E2E8F0'} |
|||
w={{ base: '100%', md: '70%' }} |
|||
> |
|||
<Image |
|||
alt={'Hero Image'} |
|||
fit={'cover'} |
|||
align={'center'} |
|||
// h={'100%'}
|
|||
src={ |
|||
'https://ik.imagekit.io/vernu/textbee/Screenshot_2023-06-18_at_11.30.25_AM.png?updatedAt=1687077054749' |
|||
} |
|||
borderRadius={'lg'} |
|||
/> |
|||
</Box> |
|||
</Flex> |
|||
</Box> |
|||
) |
|||
} |
|||
@ -0,0 +1,88 @@ |
|||
import { |
|||
Box, |
|||
Button, |
|||
chakra, |
|||
Flex, |
|||
Image, |
|||
useColorModeValue, |
|||
} from '@chakra-ui/react' |
|||
import React from 'react' |
|||
|
|||
export default function DownloadAppSection() { |
|||
return ( |
|||
<Box my={16}> |
|||
<Flex |
|||
padding={5} |
|||
background={useColorModeValue('gray.100', 'gray.700')} |
|||
borderRadius='2xl' |
|||
> |
|||
<Flex |
|||
borderRadius='2xl' |
|||
m={{ base: 5, md: 8 }} |
|||
p={{ base: 5, md: 8 }} |
|||
width='100%' |
|||
border='1px solid gray' |
|||
direction='row' |
|||
justifyContent='center' |
|||
> |
|||
<Box> |
|||
<Image |
|||
alt={'Hero Image'} |
|||
fit={'cover'} |
|||
align={'center'} |
|||
w={'180px'} |
|||
// h={'100%'}
|
|||
src={'/images/smsgatewayandroid.png'} |
|||
/> |
|||
</Box> |
|||
<Box> |
|||
<Flex |
|||
height='100%' |
|||
direction='column' |
|||
justifyContent='center' |
|||
alignItems='center' |
|||
> |
|||
<chakra.h1 |
|||
fontSize='md' |
|||
fontWeight='bold' |
|||
my={4} |
|||
color={useColorModeValue('gray.800', 'white')} |
|||
> |
|||
Download the App to get started! |
|||
</chakra.h1> |
|||
<chakra.p |
|||
fontSize='sm' |
|||
color={useColorModeValue('gray.600', 'gray.400')} |
|||
mb={4} |
|||
> |
|||
Unlock the power of messaging with our open-source Android SMS |
|||
Gateway. |
|||
</chakra.p> |
|||
<a href='/android' target='_blank'> |
|||
<Button |
|||
/* flex={1} */ |
|||
px={4} |
|||
fontSize={'sm'} |
|||
rounded={'full'} |
|||
bg={'blue.400'} |
|||
color={'white'} |
|||
boxShadow={ |
|||
'0px 1px 25px -5px rgb(66 153 225 / 48%), 0 10px 10px -5px rgb(66 153 225 / 43%)' |
|||
} |
|||
_hover={{ |
|||
bg: 'blue.500', |
|||
}} |
|||
_focus={{ |
|||
bg: 'blue.500', |
|||
}} |
|||
> |
|||
Download App |
|||
</Button> |
|||
</a> |
|||
</Flex> |
|||
</Box> |
|||
</Flex> |
|||
</Flex> |
|||
</Box> |
|||
) |
|||
} |
|||
@ -1,23 +1,23 @@ |
|||
export const howItWorksContent = [ |
|||
{ |
|||
title: 'Step 1: Download The Android App', |
|||
title: 'Step 1: Download The Android App from textbee.vernu.dev/android', |
|||
description: |
|||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.', |
|||
'', |
|||
}, |
|||
{ |
|||
title: 'Step 2: Generate an API Key from the dashboard', |
|||
description: |
|||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.', |
|||
'', |
|||
}, |
|||
{ |
|||
title: |
|||
'Step 3: Scan the QR/ enter your api key manually and enable the gateway app', |
|||
description: |
|||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.', |
|||
'', |
|||
}, |
|||
{ |
|||
title: 'Step 4: Start sending', |
|||
description: |
|||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.', |
|||
'You can now send SMS from the dashboard. or visit the API docs at https://api.textbee.vernu.dev to send SMS programatically', |
|||
}, |
|||
] |
|||
@ -1,6 +1,15 @@ |
|||
/** @type {import('next').NextConfig} */ |
|||
const nextConfig = { |
|||
reactStrictMode: true, |
|||
async redirects() { |
|||
return [ |
|||
{ |
|||
source: '/android', |
|||
destination: 'https://appdistribution.firebase.dev/i/1439f7af2d1e8e8e', |
|||
permanent: false, |
|||
}, |
|||
] |
|||
}, |
|||
} |
|||
|
|||
module.exports = nextConfig |
|||
@ -1,13 +0,0 @@ |
|||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
|||
import type { NextApiRequest, NextApiResponse } from 'next' |
|||
|
|||
type Data = { |
|||
name: string |
|||
} |
|||
|
|||
export default function handler( |
|||
req: NextApiRequest, |
|||
res: NextApiResponse<Data> |
|||
) { |
|||
res.status(200).json({ name: 'John Doe' }) |
|||
} |
|||
|
Before Width: 416 | Height: 416 | Size: 24 KiB |
|
After Width: 1080 | Height: 1545 | Size: 242 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue