📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
improved main page, added pricing
Blue Mouse8af865aecd13
diff --git a/src/App.js b/src/App.jsindex d7ebdd6d4..4246c75f4 100644--- a/src/App.js+++ b/src/App.js@@ -5,6 +5,7 @@ import { useDispatch, useSelector } from 'react-redux'import { useAlert } from 'react-alert'import Header from 'components/Header'+import Footer from 'components/Footer'import MainPage from 'pages/MainPage'import SignUp from 'pages/Auth/Signup'import SignIn from 'pages/Auth/Signin'@@ -97,6 +98,7 @@ const App = () => {<Route path={routes.docs} component={Docs} exact /><Redirect to={routes.main} /></Switch>+ <Footer /></>))diff --git a/src/components/Footer/index.jsx b/src/components/Footer/index.jsxindex 39a0bc33b..fd5e7a569 100644--- a/src/components/Footer/index.jsx+++ b/src/components/Footer/index.jsx@@ -1,15 +1,115 @@-import React from 'react'-import './styles.css'+import React, { memo } from 'react'import { Link } from 'react-router-dom'+import _map from 'lodash/map'-export default () => {+const navigation = {+ support: [+ { name: 'Pricing', href: '#' },+ { name: 'Documentation', href: '#' },+ { name: 'Guides', href: '#' },+ ],+ company: [+ { name: 'About', href: '#' },+ { name: 'Blog', href: '#' },+ ],+ legal: [+ { name: 'Privacy', href: '#' },+ { name: 'Terms', href: '#' },+ ],+ social: [+ {+ name: 'GitHub',+ href: '#',+ icon: (props) => (+ <svg fill='currentColor' viewBox='0 0 24 24' {...props}>+ <path+ fillRule='evenodd'+ d='M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z'+ clipRule='evenodd'+ />+ </svg>+ ),+ },+ ],+}++const Footer = () => {return (- <footer className={classes.footer}>- <Link to="/test">Test</Link>- |- <Link to="/test">Test</Link>- |- <Link to="/test">Test</Link>+ <footer className='bg-gray-800' aria-labelledby='footer-heading'>+ <h2 id='footer-heading' className='sr-only'>+ Footer+ </h2>+ <div className='w-11/12 mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8'>+ <div className='xl:grid xl:grid-cols-3 xl:gap-8'>+ <div className='space-y-8 xl:col-span-1'>+ <img+ className='h-10'+ src='https://tailwindui.com/img/logos/workflow-mark-gray-300.svg'+ alt='Swetrix Analytics'+ />+ <p className='text-gray-300 text-base'>+ The best apps need the best services.<br />+ Swetrix is a powerful analytics platform that respects user privacy.+ </p>+ <div className='flex space-x-6'>+ {_map(navigation.social, (item) => (+ <a key={item.name} href={item.href} target='_blank' rel='noopener noreferrer' className='text-gray-400 hover:text-gray-300'>+ <span className='sr-only'>{item.name}</span>+ <item.icon className='h-6 w-6' aria-hidden='true' />+ </a>+ ))}+ </div>+ </div>+ <div className='mt-12 grid grid-cols-2 gap-8 xl:mt-0 xl:col-span-2'>+ <div className='md:grid md:grid-cols-2 md:gap-8'>+ <div />+ <div className='mt-12 md:mt-0'>+ <h3 className='text-sm font-semibold text-gray-400 tracking-wider uppercase'>Support</h3>+ <ul className='mt-4 space-y-4'>+ {_map(navigation.support, (item) => (+ <li key={item.name}>+ <Link to={item.href} className='text-base text-gray-300 hover:text-white'>+ {item.name}+ </Link>+ </li>+ ))}+ </ul>+ </div>+ </div>+ <div className='md:grid md:grid-cols-2 md:gap-8'>+ <div>+ <h3 className='text-sm font-semibold text-gray-400 tracking-wider uppercase'>Company</h3>+ <ul className='mt-4 space-y-4'>+ {_map(navigation.company, (item) => (+ <li key={item.name}>+ <Link to={item.href} className='text-base text-gray-300 hover:text-white'>+ {item.name}+ </Link>+ </li>+ ))}+ </ul>+ </div>+ <div className='mt-12 md:mt-0'>+ <h3 className='text-sm font-semibold text-gray-400 tracking-wider uppercase'>Legal</h3>+ <ul className='mt-4 space-y-4'>+ {_map(navigation.legal, (item) => (+ <li key={item.name}>+ <Link to={item.href} className='text-base text-gray-300 hover:text-white'>+ {item.name}+ </Link>+ </li>+ ))}+ </ul>+ </div>+ </div>+ </div>+ </div>+ <div className='mt-12 border-t border-gray-200 pt-8'>+ <p className='text-base text-gray-400 xl:text-center'>© 2021 Swetrix Analytics. All rights reserved.</p>+ </div>+ </div></footer>- );-}\ No newline at end of file+ )+}++export default memo(Footer)diff --git a/src/components/Footer/styles.scss b/src/components/Footer/styles.scssdeleted file mode 100644index e69de29bb..000000000diff --git a/src/pages/MainPage/Pricing.jsx b/src/pages/MainPage/Pricing.jsxnew file mode 100644index 000000000..bea437f00--- /dev/null+++ b/src/pages/MainPage/Pricing.jsx@@ -0,0 +1,129 @@+import React, { memo } from 'react'+import { Link } from 'react-router-dom'+import { CheckIcon } from '@heroicons/react/solid'+import _map from 'lodash/map'+import _isNil from 'lodash/isNil'++import routes from 'routes'++const tiers = [+ {+ name: 'Hobby',+ priceMonthly: null,+ includedFeatures: [+ 'Up to 3000 events per month.',+ 'Create up to 5 projects.',+ '1 month of data retention.',+ 'High standard security.',+ ],+ },+ {+ name: 'Freelancer',+ href: '#',+ priceMonthly: 24,+ includedFeatures: [+ 'Everything \'Hobby\' plan includes.',+ '100k events per month.',+ 'Create up to 10 projects.',+ '12 months of data retention.',+ 'By buying this in you are supporting a small business.',+ ],+ },+ {+ name: 'Startup',+ href: '#',+ priceMonthly: 32,+ includedFeatures: [+ 'Everything \'Freelancer\' plan includes.',+ '500k events per month.',+ '12 months of data retention.',+ ],+ },+ {+ name: 'Enterprise',+ href: '#',+ priceMonthly: 48,+ includedFeatures: [+ 'Everything \'Startup\' plan includes.',+ '1m events per month.',+ '24 months of data retention.',+ ],+ },+]++const Pricing = () => {+ return (+ <div className='bg-white'>+ <div className='max-w-7xl mx-auto py-24 px-4 sm:px-6 lg:px-8'>+ <div className='sm:flex sm:flex-col sm:align-center'>+ <h1 className='text-3xl font-extrabold text-gray-900 sm:text-center'>Pricing Plans</h1>+ <p className='mt-5 text-xl text-gray-500 sm:text-center'>+ Start out for free, no credit card needed.<br />+ When your business grows, you can upgrade your plan at any time.+ </p>+ {/* <div className='relative self-center mt-6 bg-gray-100 rounded-lg p-0.5 flex sm:mt-8'>+ <button+ type='button'+ className='relative w-1/2 bg-white border-gray-200 rounded-md shadow-sm py-2 text-sm font-medium text-gray-900 whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:z-10 sm:w-auto sm:px-8'+ >+ Monthly billing+ </button>+ <button+ type='button'+ className='ml-0.5 relative w-1/2 border border-transparent rounded-md py-2 text-sm font-medium text-gray-700 whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:z-10 sm:w-auto sm:px-8'+ >+ Yearly billing+ </button>+ </div> */}+ </div>+ <div className='mt-12 space-y-4 sm:mt-16 sm:space-y-0 sm:grid sm:grid-cols-2 sm:gap-6 lg:max-w-4xl lg:mx-auto xl:max-w-none xl:mx-0 xl:grid-cols-4'>+ {_map(tiers, (tier) => (+ <div key={tier.name} className='border border-gray-200 rounded-lg shadow-sm divide-y divide-gray-200'>+ <div className='p-6'>+ <h2 className='text-lg leading-6 font-medium text-gray-900'>{tier.name}</h2>+ <p className='mt-4'>+ {_isNil(tier.priceMonthly) ? (+ <span className='text-4xl font-extrabold text-gray-900'>Free</span>+ ) : (+ <>+ <span className='text-4xl font-extrabold text-gray-900'>${tier.priceMonthly}</span>{' '}+ <span className='text-base font-medium text-gray-500'>/mo</span>+ </>+ )}+ </p>+ {_isNil(tier.priceMonthly) ? (+ <Link+ className='mt-8 block w-full bg-gray-800 border border-gray-800 rounded-md py-2 text-sm font-semibold text-white text-center hover:bg-gray-900'+ to={routes.signup}+ >+ Get started+ </Link>+ ) : (+ <a+ href={tier.href}+ className='mt-8 block w-full bg-gray-800 border border-gray-800 rounded-md py-2 text-sm font-semibold text-white text-center hover:bg-gray-900'+ >+ Buy {tier.name}+ </a>+ )}+ </div>+ <div className='pt-6 pb-8 px-6'>+ <h3 className='text-xs font-medium text-gray-900 tracking-wide uppercase'>What's included</h3>+ <ul className='mt-6 space-y-4'>+ {_map(tier.includedFeatures, (feature) => (+ <li key={feature} className='flex space-x-3'>+ <CheckIcon className='flex-shrink-0 h-5 w-5 text-green-500' aria-hidden='true' />+ <span className='text-sm text-gray-500'>{feature}</span>+ </li>+ ))}+ </ul>+ </div>+ </div>+ ))}+ </div>+ </div>+ </div>+ )+}++export default memo(Pricing)diff --git a/src/pages/MainPage/index.jsx b/src/pages/MainPage/index.jsxindex 62b336895..31a741d23 100644--- a/src/pages/MainPage/index.jsx+++ b/src/pages/MainPage/index.jsx@@ -1,32 +1,6 @@-import React from 'react'-+import React, { memo } from 'react'import SignUp from '../Auth/Signup/BasicSignup'--// const SquareDots = ({ className }) => (-// <div className='hidden sm:block sm:absolute sm:inset-0' aria-hidden='true'>-// <svg-// className={className}-// width={364}-// height={384}-// viewBox='0 0 364 384'-// fill='none'-// >-// <defs>-// <pattern-// id='eab71dd9-9d7a-47bd-8044-256344ee00d0'-// x={0}-// y={0}-// width={20}-// height={20}-// patternUnits='userSpaceOnUse'-// >-// <rect x={0} y={0} width={4} height={4} fill='currentColor' />-// </pattern>-// </defs>-// <rect width={364} height={384} fill='url(#eab71dd9-9d7a-47bd-8044-256344ee00d0)' />-// </svg>-// </div>-// )+import Pricing from './Pricing'const features = [{@@ -80,9 +54,35 @@ const faqs = [},]+const SquareDots = ({ className }) => (+ <div className='hidden sm:block sm:absolute sm:inset-0 pointer-events-none' aria-hidden='true'>+ <svg+ className={className}+ width={364}+ height={384}+ viewBox='0 0 364 384'+ fill='none'+ >+ <defs>+ <pattern+ id='eab71dd9-9d7a-47bd-8044-256344ee00d0'+ x={0}+ y={0}+ width={20}+ height={20}+ patternUnits='userSpaceOnUse'+ >+ <rect x={0} y={0} width={4} height={4} fill='currentColor' />+ </pattern>+ </defs>+ <rect width={364} height={384} fill='url(#eab71dd9-9d7a-47bd-8044-256344ee00d0)' />+ </svg>+ </div>+)+const FAQs = () => (<div className='bg-gray-50'>- <div className='max-w-7xl mx-auto py-16 px-4 sm:px-6 lg:py-20 lg:px-8'>+ <div className='w-11/12 mx-auto py-16 px-4 sm:px-6 lg:py-20 lg:px-8'><div className='lg:grid lg:grid-cols-3 lg:gap-8'><div><h2 className='text-3xl font-extrabold text-gray-900'>Frequently asked questions</h2>@@ -111,7 +111,7 @@ const FAQs = () => (const Features = () => (<div className='bg-white'>- <div className='max-w-7xl mx-auto py-16 px-4 sm:py-24 sm:px-6 lg:px-8'>+ <div className='w-11/12 mx-auto py-16 px-4 sm:py-24 sm:px-6 lg:px-8'><h2 className='text-3xl font-extrabold text-gray-900 text-center'>Why us</h2><div className='mt-12'><dl className='space-y-10 md:space-y-0 md:grid md:grid-cols-2 md:grid-rows-2 md:gap-x-8 md:gap-y-12 lg:grid-cols-3'>@@ -130,23 +130,23 @@ const Features = () => (const Main = () => {return (<div className='relative bg-gray-800'>- {/* <SquareDots className='absolute bottom-0 left-0 transform translate-x-0 mb-0 text-gray-700 lg:top-0 xl:transform-none lg:mt-72' /> */}- {/* <SquareDots className='absolute bottom-0 right-0 transform translate-x-1/2 mb-48 text-gray-700 lg:top-0 lg:mb-0 xl:transform-none xl:translate-x-0 lg:mt-16' /> */}+ <SquareDots className='absolute bottom-0 left-0 transform translate-x-0 mb-0 text-gray-700 lg:top-0 xl:transform-none lg:mt-72' />+ <SquareDots className='absolute bottom-0 right-0 transform translate-x-1/2 mb-48 text-gray-700 lg:top-0 lg:mb-0 xl:transform-none xl:translate-x-0 lg:mt-16' /><div className='relative pt-6 pb-16 sm:pb-24'><main className='mt-16 sm:mt-24'>- <div className='mx-auto max-w-7xl'>+ <div className='mx-auto w-11/12'><div className='lg:grid lg:grid-cols-12 lg:gap-8'><div className='px-4 sm:px-6 sm:text-center md:max-w-2xl md:mx-auto lg:col-span-6 lg:text-left lg:flex lg:items-center'><div><h1 className='mt-4 text-4xl tracking-tight font-extrabold text-white sm:mt-5 sm:leading-none lg:mt-6 lg:text-5xl xl:text-6xl'>- <span className='text-indigo-400 md:block'>Powerful</span>{' '}- <span className='md:block'>analytics platform that respects</span>{' '}- <span className='text-indigo-400 md:block'>user privacy</span>+ <span className='text-indigo-400'>Powerful</span>{' '}+ <span>analytics platform that respects</span>{' '}+ <span className='text-indigo-400'>user privacy</span></h1><p className='mt-3 text-base text-gray-300 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl'>Swetrix brings an advanced and customisable analytics service for your web applications.<br />- Track every metric your bisuness needs without invading your users privacy.- </p>+ Track every metric your bisuness needs without invading your users privacy.+ </p></div></div><div className='mt-16 sm:mt-24 lg:mt-0 lg:col-span-6'>@@ -182,7 +182,7 @@ const Main = () => {<div className='flex-1' /><div className='flex-1 w-full bg-white' /></div>- <div className='max-w-7xl mx-auto px-4 sm:px-6'>+ <div className='w-11/12 mx-auto px-4 sm:px-6'><imgclassName='relative rounded-lg shadow-lg'src='/assets/test_screenshot.png'@@ -192,12 +192,36 @@ const Main = () => {</div><Features />-+ <div className='bg-indigo-600'>+ <div className='w-11/12 mx-auto pb-16 pt-12 px-4 sm:px-6 lg:w-11/12 lg:px-8 lg:flex lg:items-center lg:justify-between'>+ <h2 className='text-3xl sm:text-4xl font-extrabold tracking-tight text-gray-900'>+ <span className='block text-white'>Want to know more technical details?</span>+ <span className='block text-gray-300'>+ Look at the documentation and features pags.+ </span>+ </h2>+ <div className='mt-6 space-y-4 sm:space-y-0 sm:flex sm:space-x-5'>+ <a+ href='#/'+ className='flex items-center justify-center px-3 py-2 border border-transparent text-lg font-medium rounded-md shadow-sm text-indigo-800 bg-indigo-50 hover:bg-indigo-100'+ >+ Features+ </a>+ <a+ href='#/'+ className='flex items-center justify-center px-3 py-2 border border-transparent text-lg font-medium rounded-md shadow-sm text-indigo-800 bg-indigo-50 hover:bg-indigo-100'+ >+ Docs+ </a>+ </div>+ </div>+ </div>+ <Pricing /><FAQs /><div className='bg-white'>- <div className='max-w-4xl mx-auto py-16 px-4 sm:px-6 sm:py-24 lg:max-w-7xl lg:px-8 lg:flex lg:items-center lg:justify-between'>- <h2 className='text-4xl font-extrabold tracking-tight text-gray-900 sm:text-4xl'>+ <div className='w-11/12 mx-auto pb-16 pt-12 px-4 sm:px-6 lg:w-11/12 lg:px-8 lg:flex lg:items-center lg:justify-between'>+ <h2 className='text-3xl sm:text-4xl font-extrabold tracking-tight text-gray-900'><span className='block'>Ready to get started?</span><span className='block bg-gradient-to-r from-purple-600 to-indigo-600 bg-clip-text text-transparent'>Explore our service or create an account.@@ -223,4 +247,4 @@ const Main = () => {)}-export default Main+export default memo(Main)