James DiCesare. Writer of code and words.
28 May 2021
Tribe.com is a community based social media site. It is hosted off of an AWS LAMP stack with a static IP and domain name (the computer I was going to self-host it off is having some power issues) and is maitained with Git version control. The backend was built on responsibility driven design OOP principles, and heavily leverages PHP’s new OOP features and static typing. I used MySQL for the database. You register through the “join the tribe” link, and can login to a profile page. The login creates a session token which if you do not have visiting any other page, you will get kicked out. On your profile page you get an about, profile picture, message board, edit profile info, and links to the tribes you are a member of. This is all dynamically generated at run time. The messageboard was written in Typescript where I could and Javascript where I had to. It utilizes the XMLHttpRequest API to asynchronously pull messageboard posts and DOM manipulation to append them dynamically to the messageboard. When you join a tribe you can link to the tribe page. You can only visit tribe pages that you are a member of. The tribe page has a messageboard as well, and also a tribe picture and a list of members. If you are a “council member” (group admin) then you dynamically get generated a form you can use to edit tribe information. Styling was not an express objective I had with this project but I did try using SASS instead of vanilla CSS and it probably saved me 2 days of work.
The first thing that needs to happen is you need to be able to view other people’s profiles. This may be a little difficult to do as right now the user class only recognizes the currently logged in user and will need an overloaded constructor that pulls from GET the userID of who you are trying to visit. Also there need to be less permissions on this page if you are just visiting. The styling needs A LOT of work. Styling and design and colors are not my strong suit and admittedly my wife chose the colors for the site because I made it “look like a carpet”. It could also use some animatating Javascript to breathe a little life into it. I also want to stres test and streamline my database API. I went with the tactic of a lof of little queries (see trait-queries.php, and class-dbc.php) instead of super massive queries as 1. that was way easier for me to write and 2. I read that smaller queries can be more efficient. I also want to refactor the code (at least the front end) so it can be backend agnostic (or as close to it as possible). A backend agnostic “training” site would be good for me as I am looking for jobs as a Backend Software Developer and that would allow me to play around with different technologies. I could also read about how to tighten up security and bolt the website and also the server down more. This is something that I am going to add to overtime as a way to test out new things and learn new skills. Next I hope to write out comprehensive unit tests with PHPUnit, and also Selenium, and use Git hooks to make a simple CI pipeline. Maybe someday I can write a real CI pipeline with something like Jenkins. After that I would like to add a chat feature so you can chat with other tribe members, and maybe an event calendar.