ChatAble - A chat system

Hey there :wave:

After some problems and delays, I would like to publish #chatable::tag source code


There has been lots of Sneak Peeks in this post, but probably everyone wants the .AIA to see how ti has been made
https://community.thunkable.com/t/chatable-project/3077?u=barreeeiroo


I’m not going to make a very long post, as I think everything about the system has been already published in the upper topic

Also, I would like to say that if there are no errors reported, in a week I will make a tutorial for how to integrate my system in your apps in a very simple way, using the examples of a support helpdesk or game chat rooms :wink:


Well, here is the .AIA:

The server files can be found here:

The database structure is here too:

-- phpMyAdmin SQL Dump
-- version 4.4.15.8
-- https://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 24-06-2017 a las 08:58:50
-- Versión del servidor: 5.5.50-MariaDB
-- Versión de PHP: 5.4.16

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET[email protected]@CHARACTER_SET_RESULTS */;
/*!40101 SET @[email protected]@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Base de datos: `ChatAble`
--

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `alerts`
--

CREATE TABLE IF NOT EXISTS `alerts` (
  `id` int(11) NOT NULL,
  `title` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `content` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `button` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `theme` enum('light','dark') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'dark',
  `image` varchar(10000) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Volcado de datos para la tabla `alerts`
--

INSERT INTO `alerts` (`id`, `title`, `content`, `button`, `theme`, `image`) VALUES
(1, 'Welcome', '<b>Thanks for using ChatAble</b><br>Hope you enjoy <i>;)</i>', 'Ok', 'light', 'https://s-media-cache-ak0.pinimg.com/originals/a9/69/a2/a969a2f2aa0cfebe48479abb318e5214.png');
-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `group_chats`
--

CREATE TABLE IF NOT EXISTS `group_chats` (
  `id` int(50) NOT NULL,
  `alias` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `creator` int(10) NOT NULL,
  `users` varchar(1000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '1',
  `timestamp` varchar(25) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `group_messages`
--

CREATE TABLE IF NOT EXISTS `group_messages` (
  `id` int(255) NOT NULL,
  `group_id` int(50) NOT NULL,
  `sender_id` int(10) NOT NULL,
  `content` longtext COLLATE utf8_unicode_ci NOT NULL,
  `type` enum('text','image') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'text',
  `timestamp` varchar(25) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `private_chats`
--

CREATE TABLE IF NOT EXISTS `private_chats` (
  `id` int(100) NOT NULL,
  `user_server` int(50) NOT NULL,
  `user_client` int(50) NOT NULL,
  `timestamp` int(20) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `private_messages`
--

CREATE TABLE IF NOT EXISTS `private_messages` (
  `id` int(100) NOT NULL,
  `chat_id` int(50) NOT NULL,
  `sender_id` int(10) NOT NULL,
  `content` longtext NOT NULL,
  `type` enum('text','image','cleverbot') NOT NULL DEFAULT 'text',
  `timestamp` varchar(25) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `reader`
--

CREATE TABLE IF NOT EXISTS `reader` (
  `id` int(250) NOT NULL,
  `user_id` int(10) NOT NULL,
  `chat_id` int(50) NOT NULL,
  `counter` int(5) NOT NULL,
  `type` enum('private','group','support','unknown') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'unknown'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `support_messages`
--

CREATE TABLE IF NOT EXISTS `support_messages` (
  `id` int(10) NOT NULL,
  `ticket_id` int(50) NOT NULL,
  `content` longtext COLLATE utf8_unicode_ci NOT NULL,
  `type` enum('title','text','image') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'text',
  `admin_msg` enum('true','false') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'false',
  `timestamp` varchar(30) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `support_tickets`
--

CREATE TABLE IF NOT EXISTS `support_tickets` (
  `id` int(10) NOT NULL,
  `user_id` int(10) NOT NULL,
  `admin_id` int(10) NOT NULL DEFAULT '0',
  `timestamp` int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `id` int(10) NOT NULL,
  `username` varchar(30) NOT NULL,
  `email` varchar(50) NOT NULL,
  `password` varchar(100) NOT NULL,
  `admin` enum('true','false') NOT NULL DEFAULT 'false',
  `blocked` enum('true','false') NOT NULL DEFAULT 'false'
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Volcado de datos para la tabla `users`
--

INSERT INTO `users` (`id`, `username`, `email`, `password`, `admin`, `blocked`) VALUES
(1, 'system', '[email protected]', 'null', 'true', 'false');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `versions`
--

CREATE TABLE IF NOT EXISTS `versions` (
  `id` int(10) NOT NULL,
  `versionCode` int(25) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Volcado de datos para la tabla `versions`
--

INSERT INTO `versions` (`id`, `versionCode`) VALUES
(1, 1);

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `alerts`
--
ALTER TABLE `alerts`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `group_chats`
--
ALTER TABLE `group_chats`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `group_messages`
--
ALTER TABLE `group_messages`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `private_chats`
--
ALTER TABLE `private_chats`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `private_messages`
--
ALTER TABLE `private_messages`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `reader`
--
ALTER TABLE `reader`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `support_messages`
--
ALTER TABLE `support_messages`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `support_tickets`
--
ALTER TABLE `support_tickets`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `versions`
--
ALTER TABLE `versions`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `alerts`
--
ALTER TABLE `alerts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de la tabla `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de la tabla `versions`
--
ALTER TABLE `versions`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
/*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
/*!40101 SET [email protected]_CHARACTER_SET_RESULTS */;
/*!40101 SET [email protected]_COLLATION_CONNECTION */;

Hope this helps to users trying to integrate chat systems in their apps :+1:

Regards,
Diego

10 Likes

cannot download file .aia

Updated

Try again

2 Likes

tem algum video explicando como fazer funcionar?

No, sorry :sweat:

I don’t have time to make video tutorials

1 Like

Obrigado ,é um passo a passo?

No, sorry :sweat:

You have to put all the files in the server, set the DB structure and then edit the app with your URL and password

2 Likes

Certo obrigado

A post was split to a new topic: Making a Scroll Bar

It’s ok you can’t make video tutorials, I can though… Maybe for possible chat monitor or Admin?

What do you mean? :sweat_smile:

Maybe I can do upcoming feature trailers or just tutorial videos for the components because, you said you cant do it?

If you want then you can go on :sweat_smile:

Hey can we talk through private messaging?

Contact me on Telegram:

Don’t worry about that name, it’s just a joke :stuck_out_tongue_winking_eye: (it’s my name in Russian :laughing:)
Just verify that in the Bio it sais “Diego Barreiro | @Makeroid CTO” and the username is “@Barreeeiroo

2 Likes

ChatAble is now property of Makeroid

It will still be public in free, but on Makeroid relaunch there will be a public server for anyone that wants to try it out

1 Like

Mm… I personally don’t think it should be implemented directly into Makeroid. The Project is nice, yes, but I think it should stay separate from the core Makeroid. (Until the compiler is capable of optimization and obfuscation of code, and only putting in stuff used in the app. I read somewhere that the App Inventor compiler packages all components, regardless of usage.)

But it’s going to be a project apart from it

It will have a separated server rather than Compiler, it’s not releated with the builder
It’s like a demo example project from Makeroid

Oh, I thought you were implementing it as a component. :sweat_smile: So it’s more like a Template?

1 Like

Yep, it’s impossible to implement it as component :sweat_smile:

2 Likes