Giter VIP home page Giter VIP logo

carisurau's Introduction

Contributors Forks Stargazers Issues

Carisurau.com (Formerly Ratemysurau.com)

About The Project

πŸ”Ή Lost in the mall? Can't find a surau nearby? Prayer time almost over? πŸ₯²

🌐 Introducing Carisurau.com, the best solution to find surau wherever you are!

πŸ•Œ Discover nearby suraus and prayer rooms, ensuring you don't miss prayer time, even if you're in an unfamiliar place.

⭐️ Can't find the surau you want? You can make a difference by adding it to our platform! With just one click of the 'Add Surau' button, you can help others find their way to a place of prayer.

Built With

  • Next.js
  • TRPC
  • AWS Lambda dan S3
  • PostgreSQL

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Join us today and be part of this open source project that aims to make prayer accessible to all, everywhere.

Pre-requisites

Installation

$ git clone [email protected]:farhan-helmy/ratemysurau.git

# Copy & update .env base on pre-requisite above
$ cp .env.example .env

$ yarn

# DB Setup
$ yarn db:setup
$ yarn db:migrate
$ yarn db:seed

$ yarn dev

Tests

We are using Vitest to test the application. You can use your knowledge on Jest into this as well.

https://vitest.dev/

# One time execution, useful for pipeline
$ yarn test

# Continuously watch changes on spec
$ yarn test:watch

Roadmap

  • Add tests

See the open issues for a full list of proposed features (and known issues).

License

Distributed under the MIT License. See LICENSE.txt for more information.

carisurau's People

Contributors

0xffakhrul avatar altafxx avatar atmahana avatar charaekeow avatar ezzylan avatar farhan-helmy avatar farhan-zainudin avatar ismi-abbas avatar khairulhaaziq avatar mirza-sync avatar naimhasim avatar ny0ttt avatar vicevirus avatar xavier-iv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

carisurau's Issues

Improve searching

I think searching that invoke trpc each time is bad. Maybe use basic filtering all the surau data based on inputs. Therefore we're less dependent on db.

trpc useContext
tanStack queryClient - trpc useContext() wrapper.

Caching could be another way around. Or useContext() function from trpc. Open for suggestion

Generate database schema

Database schema in mind right now is,

  • 1 state have many disctrict 1 disctrict have many surau
  • 1 surau have many reviews
  • 1 reviews many comments
  • 1 surau many images

Feature: Add Qibla verified indicator for each surau

Some of surau in Malaysia has been verified its qibla by the authorities(usually you will find the certificate are patched on the wall), hence we could introduce this an indicator to make people aware of it. Found this idea after hearing khutbah about the qibla. This is generic idea that can be discuss whether it is needed or not.

Scrape google map for each surau

Scrape google map for each surau

  • add 1 more column to Surau table google_map
  • put info / seeder to check google map location and insert into database

Waktu solat countdown

To implement waktu solat countdown at /index.tsx page
For example like if zohor dah habis, the countdown timer will countdown to asar
For now the timezone waktu solat will be defaulted to KL time
In the future we can implement user to change timezone

Sign in to review surau

saw some potential spammer, so i think need them to at least sign in or verify otp before leaving review for surau

Scrape the mall list through Wikipedia.

I have created a simple script to scrape the mall list through this wikipedia page.
But there is little bit of change in structure of the mall.json. Feel free to just copy and replace inside anywhere that fits.

https://en.wikipedia.org/wiki/List_of_shopping_malls_in_Malaysia

Note from Wikipedia : Γ†ON BiG, Billion, E-mart, Econsave, Giant, Mydin, KIPMall, Sunshine and Lotus's are categorised as hypermarkets and thus not listed in this article.

Python scrape code (Edited: quick fix for kuala lumpur malls case)

import json
from bs4 import BeautifulSoup
import requests

url = 'https://en.wikipedia.org/wiki/List_of_shopping_malls_in_Malaysia'
page = requests.get(url)
soup = BeautifulSoup(page.content, 'html.parser')

# Find all the town and state sections
town_state_sections = soup.find_all('h3')

data = {}

# Loop through each town and state section and extract the mall names
for section in town_state_sections:
    state = section.find_previous('h2').text.strip().replace('[edit]', '')
    town = section.text.strip().replace('[edit]', '')
    malls = section.find_next_sibling('ul')
    if malls is not None:
        mall_list = malls.find_all('li')
        mall_names = [mall.text.split('[')[0].strip() for mall in mall_list]
        district_name = town.split(',')[0].strip()
        if district_name not in data.setdefault(state, {}).setdefault("district", {}):
            data[state]["district"][district_name] = {"mall": mall_names}
        else:
            data[state]["district"][district_name]["mall"] = mall_names

# Find the Kuala Lumpur section
kuala_lumpur_section = soup.find('span', {'id': 'Kuala_Lumpur'}).parent

# Loop through Kuala Lumpur section and extract the mall names
kuala_lumpur_malls = []
for sibling in kuala_lumpur_section.find_next_siblings():
    if sibling.name == 'h3':
        break
    if sibling.name == 'h4':
        continue
    if sibling.name == 'ul':
        malls = sibling.find_all('li')
        for mall in malls:
            kuala_lumpur_malls.append(mall.get_text().split('[')[0].strip())

# Add Kuala Lumpur mall data to the existing data
data['Federal Territories']['district']['Kuala Lumpur'] = {"mall": kuala_lumpur_malls}

data = {"data": data}

with open('mall_data.json', 'w') as f:
    json.dump(data, f, indent=4)

mall_data.json output

{
    "data": {
        "Federal Territories": {
            "district": {
                "Kuala Lumpur": {
                    "mall": [
                        "Great Eastern Mall",
                        "Bangsar Village I & II",
                        "Bangsar Shopping Centre",
                        "NU Sentral",
                        "Berjaya Times Square",
                        "Bukit Bintang Plaza (Construction on hold)",
                        "Fahrenheit 88",
                        "Imbi Plaza",
                        "Kenanga Wholesale City",
                        "Lot 10",
                        "Malaysia Grand Bazaar",
                        "Mitsui Shopping Park LaLaport Bukit Bintang City Centre",
                        "Plaza Low Yat",
                        "Pavilion Kuala Lumpur",
                        "Sungei Wang Plaza",
                        "The Exchange TRX",
                        "The Starhill or Starhill Gallery",
                        "118 Mall",
                        "Aurora Place Mall",
                        "Pavilion Bukit Jalil",
                        "1 Shamelin Shopping Centre",
                        "\u00c6ON Taman Maluri Shopping Centre",
                        "Sunway Velocity Mall",
                        "Viva Home",
                        "Cheras Leisure Mall",
                        "Cheras Sentral Mall",
                        "EkoCheras Mall",
                        "MyTOWN Shopping Centre",
                        "8 Conlay",
                        "Avenue K Shopping Mall",
                        "Intermark Mall",
                        "M Podium KLCC (opening soon)",
                        "Shoppes At Four Seasons Place",
                        "Suria KLCC",
                        "The Conlay",
                        "The LINC KL",
                        "The Weld",
                        "Damansara City Mall (DC Mall)",
                        "Glo Damansara",
                        "Pavilion Damansara Heights",
                        "CapSquare Centre",
                        "City One Plaza",
                        "Pertama Complex",
                        "Quill City Mall",
                        "SOGO Kuala Lumpur",
                        "Sunway Putra Mall",
                        "District K @ KL Digital City",
                        "Mutiara Complex",
                        "Sungai Mas Plaza",
                        "Pearl Point Shopping Mall & Pearl Shopping Gallery",
                        "The Scott Garden",
                        "\u00c6ON Mall Metro Prima",
                        "Brem Mall",
                        "Kepong Village Mall",
                        "KL Metropolis Lifestyle Mall",
                        "KL Midtown",
                        "Met Galleria",
                        "Mid Valley Megamall",
                        "The Gardens Mall",
                        "KL Eco City Mall",
                        "KL Gateway Mall",
                        "Nexus Bangsar South",
                        "The Sphere",
                        "Pudu Plaza",
                        "Pudu Sentral",
                        "Plaza Salak Park",
                        "1 Mont Kiara",
                        "163 Retail Park",
                        "D'Immersione Avenue",
                        "Hartamas Shopping Centre",
                        "Plaza Mont Kiara",
                        "Publika Shopping Gallery",
                        "Solaris Parq The Mall",
                        "United Point",
                        "Setapak Central",
                        "\u00c6ON AU2 (Setiawangsa) Shopping Centre",
                        "Datum Jelatek Mall",
                        "Endah Parade",
                        "Plaza 63",
                        "KL East Mall",
                        "M3 Mall",
                        "Melawati Mall",
                        "\u00c6ON Mall Wangsa Maju",
                        "Wangsa Walk Mall"
                    ]
                },
                "Labuan": {
                    "mall": [
                        "Financial Park Labuan",
                        "Labuan Times Square"
                    ]
                },
                "Putrajaya": {
                    "mall": [
                        "Alamanda Shopping Centre",
                        "IOI City Mall Putrajaya",
                        "Suria Mall Putrajaya"
                    ]
                }
            }
        },
        "Johor": {
            "district": {
                "Batu Pahat": {
                    "mall": [
                        "Batu Pahat Mall",
                        "Square One Mall",
                        "The Summit Batu Pahat"
                    ]
                },
                "Iskandar Puteri": {
                    "mall": [
                        "\u00c6ON Mall Bukit Indah",
                        "\u00c6ON Taman Universiti Shopping Centre",
                        "Eco Galleria",
                        "Mall of Medini",
                        "Perling Mall",
                        "Skudai Parade",
                        "Sunway Big Box",
                        "Sutera Mall",
                        "Tasik Central",
                        "U Mall"
                    ]
                },
                "Johor Bahru": {
                    "mall": [
                        "\u00c6ON Mall Bandar Dato' Onn",
                        "\u00c6ON Permas Jaya Shopping Centre",
                        "\u00c6ON Mall Tebrau City",
                        "Angsana Johor Bahru Mall",
                        "Beletime Danga Bay",
                        "Danga City Mall (Temporarily closed for renovations)",
                        "Galleria@Kotaraya",
                        "Holiday Plaza",
                        "Johor Bahru City Square",
                        "Komtar JBCC",
                        "KSL City Mall",
                        "Paradigm Mall Johor Bahru",
                        "Paragon Market Place",
                        "Plaza Pelangi",
                        "Plaza Sentosa",
                        "R&F Mall Johor Bahru",
                        "Stellar Walk",
                        "The Mall, Mid Valley Southkey",
                        "Today's Mall",
                        "Toppen Shopping Centre"
                    ]
                },
                "Kluang": {
                    "mall": [
                        "Kluang Mall",
                        "Kluang Parade"
                    ]
                },
                "Kota Tinggi": {
                    "mall": [
                        "Heritage Mall",
                        "Plaza Kota Tinggi"
                    ]
                },
                "Kulai": {
                    "mall": [
                        "\u00c6ON Mall Kulaijaya",
                        "IOI Mall Kulai",
                        "Johor Premium Outlets",
                        "Kulai Centre Point"
                    ]
                },
                "Muar": {
                    "mall": [
                        "Wetex Parade",
                        "Muar Trade Centre"
                    ]
                },
                "Pengerang": {
                    "mall": [
                        "SKS City Mall"
                    ]
                },
                "Pontian": {
                    "mall": [
                        "Plaza Pontian"
                    ]
                },
                "Segamat": {
                    "mall": [
                        "Segamat Central(formerly One Segamat Mall)",
                        "U Sentral Shopping Centre"
                    ]
                }
            }
        },
        "Kedah": {
            "district": {
                "Alor Setar": {
                    "mall": [
                        "Alor Setar Mall",
                        "Aman Central",
                        "City Plaza",
                        "Star Parade",
                        "Sentosa Plaza"
                    ]
                },
                "Kubang Pasu": {
                    "mall": [
                        "Jitra Mall"
                    ]
                },
                "Kulim": {
                    "mall": [
                        "Kulim Landmark Central"
                    ]
                },
                "Langkawi": {
                    "mall": [
                        "Cenang Mall",
                        "Langkawi Fair Shopping Mall",
                        "Langkawi Parade"
                    ]
                },
                "Sungai Petani": {
                    "mall": [
                        "Amanjaya Mall",
                        "Central Square",
                        "Petani Parade",
                        "SP Plaza",
                        "Village Mall"
                    ]
                }
            }
        },
        "Kelantan": {
            "district": {
                "Kota Bharu": {
                    "mall": [
                        "\u00c6ON Mall Kota Bharu",
                        "KB Mall KB MALL",
                        "G-Orange Mall Tunjong",
                        "Kota Seri Mutiara Shopping Centre",
                        "Kota Bharu Trade Centre (KBTC) Kota Bharu"
                    ]
                }
            }
        },
        "Malacca": {
            "district": {
                "Alor Gajah": {
                    "mall": [
                        "Freeport A'Famosa Outlet"
                    ]
                },
                "Malacca City": {
                    "mall": [
                        "\u00c6ON Mall Melaka (Ayer Keroh)",
                        "\u00c6ON Mall Bandaraya Melaka",
                        "Dataran Pahlawan Melaka Megamall",
                        "Elements Mall Malacca",
                        "Hang Tuah Plaza",
                        "Hatten Square",
                        "Imperio mall",
                        "K7 Community Mall",
                        "Mahkota Parade",
                        "Melaka Mall (formerly Kotamas)",
                        "Soon Seng Plaza",
                        "Terminal Pahlawan (Melaka wholesale city)",
                        "The Shore Shopping Gallery"
                    ]
                }
            }
        },
        "Negeri Sembilan": {
            "district": {
                "Jempol": {
                    "mall": [
                        "Kiara Square, Bahau"
                    ]
                },
                "Nilai": {
                    "mall": [
                        "\u00c6ON Mall Nilai",
                        "MesaMall Nilai"
                    ]
                },
                "Port Dickson": {
                    "mall": [
                        "Regina Mall"
                    ]
                },
                "Seremban": {
                    "mall": [
                        "\u00c6ON Seremban 2 Shopping Centre",
                        "Angsana Seremban Mall, Ampangan",
                        "Centrepoint Seremban Shopping Mall",
                        "Era Square",
                        "KM Plaza",
                        "Palm Mall",
                        "Seremban Gateway",
                        "Seremban Prima"
                    ]
                }
            }
        },
        "Pahang": {
            "district": {
                "Cameron Highlands": {
                    "mall": [
                        "Cameron Centrum, Brinchang",
                        "Cameron Fair Shopping Centre, Tanah Rata",
                        "Cameron Square, Brinchang"
                    ]
                },
                "Genting Highlands": {
                    "mall": [
                        "Awana SkyCentral",
                        "First World Plaza",
                        "Genting Highlands Premium Outlet",
                        "Pavilion Genting Highlands",
                        "SkyAvenue"
                    ]
                },
                "Kuantan": {
                    "mall": [
                        "Berjaya Megamall",
                        "East Coast Mall",
                        "Gio Mall",
                        "Kuantan Parade",
                        "Kuantan City Mall",
                        "Teruntum Complex"
                    ]
                },
                "Temerloh": {
                    "mall": [
                        "Temerloh Mall",
                        "TMG Temerloh"
                    ]
                },
                "Mentakab": {
                    "mall": [
                        "Mentakab Star Mall"
                    ]
                }
            }
        },
        "Penang": {
            "district": {
                "Penang Island": {
                    "mall": [
                        "1st Avenue Mall",
                        "All Seasons Place",
                        "Bukit Jambul Complex",
                        "D'Piazza Mall",
                        "GAMA Supermarket & Departmental Store",
                        "GBS@Mayang",
                        "Gurney Paragon",
                        "Gurney Plaza",
                        "ICT @ Komtar Digital Mall",
                        "Island Plaza",
                        "Komtar",
                        "M Mall O2O",
                        "One Precinct",
                        "Penang Plaza",
                        "Penang Times Square",
                        "Prangin Mall",
                        "Queensbay Mall",
                        "Southbay Plaza",
                        "Sunway Valleycity Mall",
                        "Straits Quay",
                        "Udini Square"
                    ]
                },
                "Seberang Perai": {
                    "mall": [
                        "AEON Mall Bukit Mertajam",
                        "Bukit Mertajam Wholesale City",
                        "Design Village",
                        "Megamal Pinang",
                        "Pearl City Mall",
                        "Sunway Carnival Mall"
                    ]
                }
            }
        },
        "Perak": {
            "district": {
                "Ipoh": {
                    "mall": [
                        "\u00c6ON Mall Ipoh Station 18",
                        "\u00c6ON Mall Kinta City",
                        "\u00c6ON Mall Klebang",
                        "\u00c6ON Midtown Falim",
                        "Angsana Ipoh Mall"
                    ]
                },
                "Kampar": {
                    "mall": [
                        "Kampar Terminal Mall",
                        "Tin Village Mall"
                    ]
                },
                "Kerian": {
                    "mall": [
                        "Kerian Sentral Mall, Parit Buntar"
                    ]
                },
                "Manjung": {
                    "mall": [
                        "\u00c6ON Mall Seri Manjung"
                    ]
                },
                "Perak Tengah": {
                    "mall": [
                        "D'Mall, Seri Iskandar"
                    ]
                },
                "Taiping": {
                    "mall": [
                        "\u00c6ON Mall Taiping",
                        "Taiping Mall",
                        "Taiping Sentral Mall"
                    ]
                }
            }
        },
        "Sabah": {
            "district": {
                "Interior Division": {
                    "mall": [
                        "Keningau Mall"
                    ]
                },
                "Sandakan Division": {
                    "mall": [
                        "Harbour Mall Sandakan"
                    ]
                },
                "Tawau Division": {
                    "mall": [
                        "Eastern Plaza"
                    ]
                },
                "Kota Kinabalu": {
                    "mall": [
                        "1Borneo Hypermall",
                        "88 Mall",
                        "Centre Point Sabah",
                        "City Mall",
                        "EG Mall Inanam",
                        "Grand Merdeka",
                        "Imago KK Times Square",
                        "Inanam Mall",
                        "ITCC Penampang",
                        "Jesselton Residences (Jesselton Duty Free Mall)",
                        "Karamunsing Complex",
                        "KK Plaza",
                        "Mega Long Mall",
                        "Oceanus Waterfront Mall",
                        "Plaza Shell",
                        "Riverson The Walk",
                        "Suria Sabah",
                        "Sutera Avenue",
                        "Wisma Merdeka"
                    ]
                }
            }
        },
        "Sarawak": {
            "district": {
                "Bintulu": {
                    "mall": [
                        "Bintulu Terminal Bus Station",
                        "Boulevard Shopping Mall Bintulu",
                        "City Point Mall",
                        "Li Hua Plaza",
                        "Medan Mall",
                        "Naim Street Mall",
                        "Parkcity Commerce Square Mall",
                        "Parkcity Mall",
                        "The Spring Bintulu",
                        "Times Square Mega Mall"
                    ]
                },
                "Kota Samarahan": {
                    "mall": [
                        "Aiman Mall (@iman Mall)",
                        "Summer Mall",
                        "La Promenade Mall"
                    ]
                },
                "Kuching": {
                    "mall": [
                        "\u00c6ON Mall Kuching Central",
                        "Aeroville Mall",
                        "Boulevard Shopping Mall",
                        "CityOne Megamall",
                        "Crown Square",
                        "Eco Mall",
                        "Electra House",
                        "Farley Mall",
                        "Genesis Parade",
                        "Green Heights Mall",
                        "Hock Lee Centre (Under renovation)",
                        "Hopoh Shopping Centre",
                        "Kuching Sentral",
                        "Majma Mall",
                        "Matang Mall",
                        "MetroMall",
                        "Moyan Square",
                        "OneJaya Lifestyle Mall",
                        "One TJ ICT Shopping Complex",
                        "Papillon Street Mall",
                        "Plaza Merdeka Shopping Center",
                        "Riverside Shopping Complex",
                        "Sarawak Plaza",
                        "ST3 Shopping Mall",
                        "Tabuan Plaza",
                        "The Hills",
                        "The Spring Shopping Mall",
                        "Tun Jugah Mall",
                        "Vivacity Megamall",
                        "Wisma Saberkas",
                        "Wisma Satok",
                        "Wisma Sentosa",
                        "Wisma Wan"
                    ]
                },
                "Limbang": {
                    "mall": [
                        "Limbang Plaza"
                    ]
                },
                "Miri": {
                    "mall": [
                        "Bintang Megamall",
                        "Boulevard Shopping Mall Miri",
                        "Imperial Mall",
                        "Miri Plaza",
                        "MYY Mall",
                        "Pelita Tunku",
                        "Permaisuri Imperial City Mall",
                        "Permy Mall",
                        "Soon Hup Tower"
                    ]
                },
                "Mukah": {
                    "mall": [
                        "Medan Mall"
                    ]
                },
                "Serian": {
                    "mall": [
                        "Eastern Mall"
                    ]
                },
                "Sibu": {
                    "mall": [
                        "Delta Mall",
                        "Hann's Residence",
                        "Medan Mall",
                        "Sarawak House Shopping Complex",
                        "Star Mega Mall",
                        "The Swan Square",
                        "Wisma Sanyan"
                    ]
                },
                "Sri Aman": {
                    "mall": [
                        "Plaza Simanggang"
                    ]
                }
            }
        },
        "Selangor": {
            "district": {
                "Ampang Jaya": {
                    "mall": [
                        "Ampang Point",
                        "Axis Atrium",
                        "Galaxy Ampang",
                        "Pandan Capital Mall",
                        "Spectrum Shopping Mall"
                    ]
                },
                "Bandar Baru Bangi": {
                    "mall": [
                        "Bangi Gateway",
                        "De Centrum Mall",
                        "Evo Bangi"
                    ]
                },
                "Cheras": {
                    "mall": [
                        "\u00c6ON Cheras Selatan Shopping Centre",
                        "BMC Mall (formerly AEON Makhota Cheras)"
                    ]
                },
                "Cyberjaya": {
                    "mall": [
                        "D'Pulze Shopping Centre",
                        "Gem In Mall",
                        "Shaftsbury Square Cyberjaya"
                    ]
                },
                "Kajang": {
                    "mall": [
                        "Metro Point Kajang",
                        "Plaza Metro Kajang"
                    ]
                },
                "Klang": {
                    "mall": [
                        "\u00c6ON Mall Bukit Raja",
                        "\u00c6ON Mall Bukit Tinggi",
                        "Centro Mall",
                        "Galleri Klang Sentral",
                        "GM Klang Wholesale City",
                        "Harbour Place",
                        "Klang Parade",
                        "KSL Esplanade Mall",
                        "Sunway Pier Port Klang (Opening Soon)"
                    ]
                },
                "Petaling Jaya": {
                    "mall": [
                        "1 Utama",
                        "3 Damansara",
                        "Amcorp Mall",
                        "Atria Shopping Gallery",
                        "CITTA Mall",
                        "Empire City Mall",
                        "Evolve Concept Mall",
                        "IPC Shopping Centre",
                        "Jaya One",
                        "Jaya Shopping Centre",
                        "Paradigm Mall Petaling Jaya",
                        "Sunway Giza",
                        "The Curve",
                        "The Starling",
                        "Tropicana Gardens Mall"
                    ]
                },
                "Selayang": {
                    "mall": [
                        "\u00c6ON Rawang Anggun Shopping Centre",
                        "Selayang Mall",
                        "Selayang Capitol Complex",
                        "168 Park Selayang Mall (Opening Soon by Year 2024)"
                    ]
                },
                "Semenyih": {
                    "mall": [
                        "Ecohill Walk Mall"
                    ]
                },
                "Sepang": {
                    "mall": [
                        "Gateway@klia2",
                        "Mitsui Outlet Park KLIA Sepang"
                    ]
                },
                "Seri Kembangan": {
                    "mall": [
                        "\u00c6ON Taman Equine Shopping Centre",
                        "South City Plaza",
                        "The Mines"
                    ]
                },
                "Shah Alam": {
                    "mall": [
                        "\u00c6ON Mall Shah Alam",
                        "Anggerik Mall",
                        "Central i-City",
                        "IRDKL Mall",
                        "Kompleks PKNS Shah Alam",
                        "Ole-Ole Shopping Centre",
                        "Plaza Shah Alam",
                        "Plaza Alam Sentral",
                        "SACC Mall Shah Alam",
                        "Setia City Mall",
                        "Space U8 Mall",
                        "Star Avenue Lifestyle Mall"
                    ]
                },
                "Subang Jaya": {
                    "mall": [
                        "Da Men Mall",
                        "Empire Shopping Gallery",
                        "IOI Mall Puchong Jaya",
                        "M Square Puchong",
                        "Main Place Mall",
                        "Pallazo 19 Mall (formerly known as The 19 USJ City Mall)",
                        "One City Mall",
                        "Setia Walk, Puchong",
                        "SS15 Courtyard",
                        "Subang Parade",
                        "Sunway Pyramid",
                        "Sunway South Quay Mall (Opening Soon)",
                        "The Summit USJ"
                    ]
                },
                "Telok Panglima Garang": {
                    "mall": [
                        "Quayside Mall",
                        "Sanctuary Mall"
                    ]
                }
            }
        },
        "Terengganu": {
            "district": {
                "Kemaman": {
                    "mall": [
                        "Kemaman Centre Point",
                        "Mesra Mall, Kemasik"
                    ]
                },
                "Kuala Terengganu": {
                    "mall": [
                        "KTCC Mall",
                        "Paya Bunga Square/Sentral",
                        "Mayang Mall"
                    ]
                }
            }
        }
    }
}

carisurau user can follow other user

carisurau user can follow other user

  • Able to see other user uploaded surau
  • user profile are private by default
  • user can set their profile to public

Quick Onboarding Setup

Assalamualaikum,

There's some issue with initial setup for new onboarding developer to get started quickly.

1. Google Identity setup is required

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

Currently this is a blocker for me to spin locally as I need to setup google identity oauth. Is there env that can bypass this setup for developer to contribute faster?

Edit: I've added a guide you can add to your wiki. Just copy paste.
#63

2. DB Seed has setup errors

Following the Installation setup in Readme, there's issue with db setup. Migration steps are missing.

Will create a PR to support you in this, as I was able to spin up the db successfully. (plus Readme update)

$ yarn
$ yarn db:migrate # will create PR to have this script
$ yarn db:seed # will create PR to have this script

Unfortunately, even after seed I can't seem to see the record in the homepage. Suggesting a dummy seed data for contributors.

3. Secret exposed for local DB

I believe this was intended for local development, but for safety, best to change to Makefile password to password.

image

4. Usage of .env.local

You might be using this for separating local and remote, but for new onboarding user, I suggest to keep it simple with .env.

    # there's `.env.local` here
    "db-seed:local": "NODE_ENV=development dotenv -e .env.local -- prisma db seed"

Or we can update Readme to include .env.local as part of setup.

Add Surau save as draft function

Adding surau is a hefty process, I wanna introduce and implement save as draft function so user can continue adding their surau after

Random surau query for main page

Right now the way Surau appear on the homepage or u wanna call it index.ts page is select latest added surau limit 5

It would be nice is we can implement:

  • simple algorithm to query the surau
  • do a random query for surau
  • query surau based on user location if the user allow location for carisurau app
  • this task can be breakdown further based on the goals

Tag thumbnail image

Users should be able to tag the images that will be the thumbnail.

This change should include styling for image uplaod preview.

akshually considerable idea

Akan datang, ingin tahu surau sekian dah rakaat ke berapa

akan ada raspberry pi utk voice recognition utk laungan allahuakbar dah berapa kali.

if dah allahuakbar sekian kali dan samiallahuliman hamidah dah berapa kali means dia dah rakaat ke sekian

dengan condition waktu apa menggunakan API mengikut timezone sekian

Wrong rating percentage calculation

for every star receive from feedback, there are wrong calculation for the percentage
example

1 star have 1 feedback, it will become 100%,
2 start have 1 feedback, it will become 50%,
and so on

Add one page for surau filter

Talk to your user!
as suggested by @ Zahin Syahiran
Screenshot from 2023-06-09 21-06-33

planning to do this when reaching at least 10 or 15 contributed surau

Google OAuth Setup (Copy Paste)

Note: You can copy paste this inside a "wiki" (recommended) as it is a doc of its own.

Github Setting > Features > Wiki (Toggle)

Afterward, feel free to attach this new Wiki to your Readme or to my PR:
#62

Overview

We are using Google OAuth to allow user to sign in into the application, and make adjustment to the records. If you are developing or contributing to this project, kindly follow the steps to configure your local OAuth.

Pre-Requisites

You will need to register to Google Cloud, in order to create project.

https://console.cloud.google.com/

Click "Select a Project", and setup a new project.

image
image

It'll take some time to setup, so be patient.

1. Configuring OAuth Consent Screen

Head over to this link to setup: https://console.cloud.google.com/apis/credentials/consent

Fill in the form as follows:

  1. User Type: External
  2. App Information
    a. App Name: CariSurau-Dev
    b. User Support Email: <your email>
    c. Developer contact information: <your_email>
  3. Scopes: Just Save and Continue, no change
  4. Test users
    a. Click Add Users
    b. Fill in your <email>
    c. Click "Add" first time
    d. Click "Add" again for second time
    e. Click "Save and Continue"
  5. Finally, click "Back to Dashboard"

2. Configuring Credentials

Head over to this link: https://console.cloud.google.com/apis/credentials

  1. Click + Create Credentials, choose OAuth Client ID
  2. Fill in the forms
    a. Application Type: Web Application
    b. Name: CariSurau-Dev
    c. Authorized Javascript URL: http://localhost:3000
    d. Authorized redirect URL: http://localhost:3000/api/auth/callback/google
  3. Finally, click "Create"

For more info about the callback URL, we are using NextAuth Google. More info: https://next-auth.js.org/providers/google

You should see a popup with credentials. Those are important secrets and never share with anyone. Do not commit into Git as well.

With that in mind, copy it accordingly into your ENVs.

/.env

GOOGLE_CLIENT_ID=<Client ID>
GOOGLE_CLIENT_SECRET=<Client secret>

3. Final Test

To verify that everything works well, feel free to head over to the system and try to login.

image

Login using your account as usual.

image

Finally, you can now add records into the system and play around!

image

ps: I've omitted my profile picture from the source for this screenshot purpose, otherwise you should see your profile picture on top-right.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.